On this page

Table

When to use a table, rows and states, long values, empty tables and tokens.

Draft. Ported from control-center’s Table and restyled with Beehexa tokens. Not yet approved; the API may still change.

A table shows records that share the same fields, one per row, so people can scan and compare them.

When to use

  • Records with the same columns: orders, products, connections, sync runs.
  • When people compare values across rows or sort and filter them.
  • Key–value settings with long values, using table-fixed.

When not to use

  • For layout. Use CSS grid or flex.
  • For a few items with actions and no columns to compare. Use an Item list.
  • For content people read rather than scan, such as a summary with actions. Use a Card.

Rows and states

State Looks Set
Rest No fill, a line between rows —
Hover color.background.neutral.subtle.hover, lighter than selected (D13) Automatic
Selected color.background.selected and a yellow bar at the row’s start (D24) data-state="selected"
Selected, hover color.background.selected.hover Automatic

Selection always has the bar as its second cue, so it does not rely on the fill. Give a row to to make the whole row a link; put a real link on the row’s name as well, for keyboard users.

Content

  • Column headers in sentence case, short, as written: “ERP sync”, not “ERP SYNC”.
  • Numbers and money right-aligned with text-end tabular-nums, so digits line up.
  • IDs, keys and URLs in the code font (font.code.default).
  • Status as a Badge, one per row.
  • Long values people copy (keys, tokens, URLs): class="table-fixed" on the table with widths on the headers, and break-all on the cell. Never cut them with an ellipsis.
  • No rows: a TableEmpty row that says why, such as “No orders match “Lotus”.” For a table that is empty before first use, show an Empty state instead.

Tokens

Part Tokens
Container color.surface, border.width.default in color.border, radius.card
Cells space.table.cell.x, space.table.cell.y; font.body.default, color.text
Header color.surface.subtle, color.text.subtle, font.label.small
Row lines border.width.default in color.border
Hover color.background.neutral.subtle.hover
Selected color.background.selected (.hover), border.width.selected bar in color.border.selected
Footer color.surface.subtle, font.label.default
Caption color.text.subtle, font.body.small
Empty row space.500 above and below, color.text.subtle