Default

NameRoleStatus
AliceEngineerActive
BobDesignerActive
CarolManagerInactive
DaveEngineerActive
<Table>
  <Table.Thead>
    <Table.Tr>
      <Table.Th>Name</Table.Th>
      <Table.Th>Role</Table.Th>
      <Table.Th>Status</Table.Th>
    </Table.Tr>
  </Table.Thead>
  <Table.Tbody>
    {rows.map((row) => (
      <Table.Tr key={row.name}>
        <Table.Td>{row.name}</Table.Td>
        <Table.Td>{row.role}</Table.Td>
        <Table.Td>{row.status}</Table.Td>
      </Table.Tr>
    ))}
  </Table.Tbody>
</Table>

Striped rows

NameRoleStatus
AliceEngineerActive
BobDesignerActive
CarolManagerInactive
DaveEngineerActive
<Table striped>...</Table>

Selected rows

Add selected to any <Table.Tr> to apply the themed selected-row highlight.

NameRoleStatus
AliceEngineerActive
BobDesignerActive
CarolManagerInactive
DaveEngineerActive
<Table>
  <Table.Tbody>
    <Table.Tr selected>
      <Table.Td>Alice</Table.Td>
      <Table.Td>Engineer</Table.Td>
      <Table.Td>Active</Table.Td>
    </Table.Tr>
    <Table.Tr>
      <Table.Td>Bob</Table.Td>
      ...
    </Table.Tr>
  </Table.Tbody>
</Table>

With borders and hover

NameRoleStatus
AliceEngineerActive
BobDesignerActive
CarolManagerInactive
DaveEngineerActive
<Table withTableBorder withColumnBorders highlightOnHover>
  ...
</Table>

Table Props

PropTypeDefaultDescription
stripedboolean|'odd'|'even'—Applies alternating row background colors
highlightOnHoverboolean—Applies hover background to rows
captionSide'top'|'bottom'—Positions the <caption> element
withTableBorderboolean—Adds a border around the entire table
withColumnBordersboolean—Adds vertical borders between columns
withRowBordersbooleantrueShows horizontal borders between rows
borderColorstring—CSS color applied to all table border lines
horizontalSpacing'xs'|'sm'|'md'|'lg'|'xl'|string—Padding left/right of each cell
verticalSpacing'xs'|'sm'|'md'|'lg'|'xl'|string—Padding top/bottom of each cell
layout'auto'|'fixed'—CSS table-layout algorithm
classstring—Additional CSS class names on <table>
styleobject—Inline styles

Sub-components

ExportRendersDescription
Table.Thead / TableThead<thead>Table header section
Table.Tbody / TableTbody<tbody>Table body section
Table.Tfoot / TableTfoot<tfoot>Table footer section
Table.Tr / TableTr<tr>Table row; accepts selected to apply the selected-row highlight
Table.Th / TableTh<th>Header cell; accepts align and width
Table.Td / TableTd<td>Data cell; accepts align and width
Table.Caption / TableCaption<caption>Table caption