Skip to content
esc

Table

Data displayshadcn/ui

52px rows, a quiet 13px header, row hover, and `numeric` cells that right-align amounts with tabular figures. Scrolls sideways on narrow screens.

When to use

  • Put status in a Badge and actions in a ghost IconButton with a Menu at the row end.
  • For empty data render one row with a colSpan EmptyState (size='inline'); for loading, rows of Skeleton.
  • Don't use it on phones; use List rows.
  • Don't center text columns; only numbers align right.

Accessibility

Role
table
Keyboard
Interactive cells are tabbable in reading order.
Notes
Use TableHead for column headers so cells get their names.
Note
Add a TableCaption or aria-label naming the table.

Props

  • TableHead / TableCell numeric= false

    boolean

    Right-align numbers and amounts.

  • TableRow data-state

    'selected'

    Highlights a selected row.

Prompt for your agent

Use the UnbuiltUI Table. Call unbuilt_get_component("Table") first and follow its spec: variants, states, usage rules and accessibility.

unbuilt_get_component returns

0 variants5 states2 props4 usage rules3 a11y notes4 tokens1 example

Add it with shadcn

$npx shadcn add https://unbuiltui.com/r/table.json

Tokens · 4

border.subtlebg.subtlefg.defaultfg.muted