Table

レスポンシブでアクセス可能、かつカスタマイズ可能なデータテーブルを構築するための堅牢なコンポーネントセット。ソート、サイズ変更、ページネーション、境界線などのサポートが含まれます。

Table

テーブルプリミティブを使用して、組み込みのスタイリングを備えた標準的なHTMLテーブルを構成します。

Name
Title
Email
John Doe Frontend Engineer john@example.com
Jane Smith Product Manager jane@example.com

Advanced Table Features

Tables can include resizable columns, sortable headers, sticky states, nested UI components (avatars, tags, buttons), and tree structures.

Employee
Status
Role
Actions
Alice Cooper alice@company.com
Active Designer
Bob Builder bob@company.com
On Leave Junior Designer
Charlie Davis charlie@company.com
Offline Developer
Showing 1 to 3 of 24 results

Client-side Sorting

Add sortable and sortDirection to TableHeadCell to enable click-to-sort functionality. The table includes automatic string and numeric sorting client-side out-of-the-box.

Name
Age
Role
Alice Smith 28 Engineer
Charlie Brown 42 Manager
Bob Jones 35 Designer

Client-side Filtering

Use an external or nested input field equipped with data-filter-table="true" and data-filter-col="index" to instantly filter row contents based on column matches.

ID
User
Email
1 Alice Smith alice@smith.com
2 Bob Jones bob@jones.com
3 Charlie Brown charlie@brown.com

Resizing Columns

Add resizable to TableHeadCell to render a drag handle on the right edge of the header, allowing horizontal column adjustment. Note: This requires fixed table layouts (`table-fixed`).

Company
Contact
Country
Acme Corp John Doe USA
Globex Jane Smith UK

Drag and Drop Columns

Add draggable to TableHeadCell to enable dragging columns left/right. The table script automatically manages column DOM shifts.

ID
Product
Price
001 Laptop $999
002 Phone $599

Row Grouping

Tables can group rows together. Use data-group-header="true", data-group-id, and aria-expanded on the header row, and data-group="id" on the child rows. The component includes built-in client-side toggle logic.

Team Member
Role
Status
Engineering (2)
Alice Smith Frontend Developer Active
Bob Jones Backend Developer Active

Table

テーブルには、フォーム入力などの複雑なインタラクティブ要素を含めることができ、インライン編集が可能になります。

Product
Category
Price
Stock

Table

テーブルは、ソート可能な列、ドラッグ可能な列、およびサイズ変更可能な列で構成できます。

Name
Age
Location
Alice 28 New York
Bob 34 San Francisco
Charlie 22 London

Table

テーブルは、大規模なデータセットを処理するためのページネーションコンポーネントと簡単に統合できます。

ID
User
Role
001 John Doe Admin
002 Jane Smith User

API リファレンス

Table

プロパティ
説明
タイプ
デフォルト

size

テーブルサイズのプリセット 'sm' | 'md' | 'lg' 'md'

striped

ストライプ行のスタイリングを適用します boolean false

bordered

テーブルコンテナに境界線を適用します boolean true

maxHeight

最大高さ(500px)を適用し、スクロールを有効にします boolean false

containerClass

テーブルコンテナのカスタムクラス string ''

TableCell

プロパティ
説明
タイプ
デフォルト

align

セルのテキストの配置 'left' | 'center' | 'right' 'left'

padding

カスタムコンテンツのパディングリセット 'default' | 'none' 'default'

TableHeadCell

プロパティ
説明
タイプ
デフォルト

sticky

ヘッダーセルを固定(sticky)にします boolean false

sortable

列のソートを有効にします boolean false

resizable

列のサイズ変更を有効にします boolean false

draggable

ドラッグアンドドロップによる列の並べ替えを有効にします boolean false