Skip to content

Table

The Table component provides a composable API for creating accessible, semantic HTML tables with support for expandable rows, nested tables, and flexible customization.

It is designed for displaying structured data using native HTML table elements while maintaining accessibility, reusable subcomponents, and full control over table interactions.

  • Composable table API: Build structured tables using Table.Head, Table.HeaderCell, Table.Row, and Table.Cell.
  • Semantic HTML markup: Uses native table elements (table, thead, tr, th, and td) for improved accessibility and SEO.
  • Expandable table rows: Reveal additional information dynamically below individual rows.
  • Nested tables support: Display related datasets inside expandable sections.
  • Flexible styling: Apply custom classes and styles to any table element.
Transaction Invoices
291246
1
291072
2
ComponentDescription
TableRoot container for the HTML table.
Table.HeadWrapper for the table header (thead).
Table.HeaderCellTable header cell component (th).
Table.RowTable row component (tr).
Table.CellTable data cell component (td).
Table.ExpandButtonExpandable row toggle indicator.
ComponentPropTypeDefaultDescription
Tableclassstring""Additional CSS classes applied to the table element.
Table.HeaderCellcolspannumber1Number of columns the header cell spans.
Table.HeaderCellclassstring""Additional CSS classes applied to the header cell.
Table.Rowclassstring""Additional CSS classes applied to the table row.
Table.RowonclickfunctionOptional click handler for row interactions.
Table.Cellcolspannumber1Number of columns the table cell spans.
Table.Cellclassstring""Additional CSS classes applied to the table cell.
Table.ExpandButtonexpandedbooleanfalseControls the expanded state of the toggle indicator.

The Table component supports expandable rows by allowing applications to manage expansion state externally and render additional Table.Row elements when needed.

The Table.ExpandButton component works as a visual indicator for expandable content. The expansion behavior and state management remain fully controlled by your application.

  • Use semantic HTML table elements to improve accessibility and search engine understanding.
  • Use Table.HeaderCell for column labels instead of regular data cells.
  • Keep row interactions predictable and provide clear visual feedback.
  • Use Table.ExpandButton to indicate expandable table content.
  • Render expanded content inside a dedicated Table.Row with a Table.Cell spanning all columns.
  • Use nested tables only for related structured data that benefits from hierarchical presentation.