Skip to content
GitHub

Table

A responsive table component.

A list of users in your workspace.
NameEmailRoleStatus
Alice Johnsonalice.johnson@example.comAdminactive
Bruno Silvabruno.silva@example.comEditorinvited
Clara Mendesclara.mendes@example.comViewerinactive
David Parkdavid.park@example.comEditoractive

Installation

Usage

Accessibility

Always use a <TableCaption /> to help assistive technologies announce what the table represents.

Use with the sr-only class to make the caption screen-reader only if you don't want to show it.

Examples

Striped

Use variant="striped" on <Table /> for alternating row backgrounds.

Users with alternating row backgrounds.
NameEmailRoleStatus
Alice Johnsonalice.johnson@example.comAdminActive
Bruno Silvabruno.silva@example.comEditorInvited
Clara Mendesclara.mendes@example.comViewerInactive
David Parkdavid.park@example.comEditorActive

Use <TableFooter /> for summary rows, totals, or notes.

Order summary with footer totals.
ItemQtyUnit priceAmount
Wireless mouse2$29.99$59.98
Mechanical keyboard1$149.99$149.99
USB-C hub3$45.00$135.00
Total$379.47

With actions

Add an actions column with buttons per row.

Users with row actions (edit, delete).
NameEmailActions
Alice Johnsonalice@example.com
Bruno Silvabruno@example.com
Clara Mendesclara@example.com

With action bar

Use checkboxes for row selection and an action bar that appears when one or more rows are selected. See the action bar component.

Orders with checkbox selection and action bar.
IDNameStatusAmount
SO-01Macbook Pro 16progress245,12 $
SO-02Apple Watch Series 9transit122,18 $
SO-03AirPods Maxpending89,50 $
SO-04iPad Pro 13pending310,00 $
SO-05iPhone 15 Pro Maxtransit156,75 $

With context menu

Wrap each row with ContextMenuTrigger so right-clicking shows a context menu with row actions.

Users with row context menu. Right-click a row to open the menu.
NameEmail

Disable row hover

Set isHoverable={false} on <Table /> to disable the hover background on body rows.

Table with row hover disabled (isHoverable=false).
NameEmail
Alice Johnsonalice@example.com
Bruno Silvabruno@example.com
Clara Mendesclara@example.com

API Reference

Table

Scrollable wrapper around a native table. Supports striped and hover variants.

TableHeader

Table header row group.

TableBody

Table body row group.

TableFooter

Table footer row group for totals or summary rows.

TableRow

A single table row.

TableHead

Header cell for column titles.

TableCell

Data cell for body or footer rows.

TableCaption

Accessible caption describing the table. Use sr-only for screen-reader only.