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>

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
highlightOnHoverbooleanApplies hover background to rows
captionSide'top'|'bottom'Positions the <caption> element
withTableBorderbooleanAdds a border around the entire table
withColumnBordersbooleanAdds vertical borders between columns
withRowBordersbooleantrueShows horizontal borders between rows
borderColorstringCSS color applied to all table border lines
horizontalSpacing'xs'|'sm'|'md'|'lg'|'xl'|stringPadding left/right of each cell
verticalSpacing'xs'|'sm'|'md'|'lg'|'xl'|stringPadding top/bottom of each cell
layout'auto'|'fixed'CSS table-layout algorithm
classstringAdditional CSS class names on <table>
styleobjectInline 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
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