Table

A structured layout for displaying tabular data.

Basic

A full table with header, body, and three columns. The Status column uses Badge to communicate state.

NameRoleStatus
Alice MartinAdminActive
Bob ChenEditorPending
Clara OseiViewerInactive
<Table>
<TableHeader>
  <TableRow>
    <TableHead>Name</TableHead>
    <TableHead>Role</TableHead>
    <TableHead>Status</TableHead>
  </TableRow>
</TableHeader>
<TableBody>
  <TableRow>
    <TableCell>Alice Martin</TableCell>
    <TableCell>Admin</TableCell>
    <TableCell><Badge variant="success" dot>Active</Badge></TableCell>
  </TableRow>
  <TableRow>
    <TableCell>Bob Chen</TableCell>
    <TableCell>Editor</TableCell>
    <TableCell><Badge variant="warning" dot>Pending</Badge></TableCell>
  </TableRow>
  <TableRow>
    <TableCell>Clara Osei</TableCell>
    <TableCell>Viewer</TableCell>
    <TableCell><Badge variant="error" dot>Inactive</Badge></TableCell>
  </TableRow>
</TableBody>
</Table>

With footer

TableFooter renders a <tfoot> with a muted background, useful for totals or summaries.

NameRoleStatus
Alice MartinAdminActive
Bob ChenEditorPending
2 users1 active
<TableFooter>
<TableRow>
  <TableCell>2 users</TableCell>
  <TableCell></TableCell>
  <TableCell>1 active</TableCell>
</TableRow>
</TableFooter>

With caption

TableCaption renders a <caption> element below the table describing its contents.

Team members and their current access roles.
NameRole
Alice MartinAdmin
Bob ChenEditor
<Table>
<TableCaption>Team members and their current access roles.</TableCaption>
<TableHeader>…</TableHeader>
<TableBody>…</TableBody>
</Table>

Props

Table

PropTypeDefaultDescription
classNamestringAdditional Tailwind classes on the <table> element
childrenReactNodeTable sections

TableHeader / TableBody / TableFooter

All three wrap their respective HTML section elements (<thead>, <tbody>, <tfoot>) and accept className and children.

TableRow

PropTypeDefaultDescription
classNamestringAdditional Tailwind classes
childrenReactNodeTableHead or TableCell elements

TableHead

PropTypeDefaultDescription
classNamestringAdditional Tailwind classes on the <th>
childrenReactNodeColumn heading content

TableCell

PropTypeDefaultDescription
classNamestringAdditional Tailwind classes on the <td>
childrenReactNodeCell content

TableCaption

PropTypeDefaultDescription
classNamestringAdditional Tailwind classes on the <caption>
childrenReactNodeCaption text describing the table