Table

A bordered, horizontally scrollable shell around a native table. Write normal thead/tbody markup; the cells are styled for you.

Examples

Basic

Team
NameRoleStatus
Ada LovelaceEngineer active
Grace HopperCompiler team away
Show code
<Table caption="Team">
  <thead>
    <tr><th scope="col">Name</th><th scope="col">Role</th></tr>
  </thead>
  <tbody>
    <tr><th scope="row">Ada Lovelace</th><td>Engineer</td></tr>
  </tbody>
</Table>

Props

PropTypeDefaultDescription
captionstring—Optional caption above the header row.
childrenSnippet—The thead and tbody rows, using normal table markup.

Other attributes are spread onto the <table>, while class goes on the scroll wrapper. Cell styles are scoped under .table, so they cannot leak into the rest of your app.