Table

Compound data-table primitive: Table / TableHead / TableBody / TableRow / TableHeader / TableCell. Sortable column headers, row hover highlight, selected-row accent edge. Render TableStyles once on the page to enable the hover styling.

Order IDPart IDSource LocationSource LevelTotal Volume
AB-00032734X60 BJGJ29839281US, Denver - 2407166%10.9985
AB-00032612X62 BAGJ28599202US, New York - 2501886%7.28699
AB-00032736X61 BHH09027512US, San Francisco - 2738175%8.85221

Add to your project

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/andromeda-table

Props

Every prop this component accepts. Any other prop is forwarded to the underlying element.

TableRow

PropTypeDefaultDescription
selectedbooleanfalseApplies surface.active bg + accent-300 left edge.
hoverablebooleantrueAdds the hover-lift class (default true).

TableHeader

PropTypeDefaultDescription
sort'asc'|'desc'|'sortable'|undefined-Column sort state; picks the matching caret and sets aria-sort.
align'left'|'right'|'center''left'Horizontal text alignment of the header cell.

TableCell

PropTypeDefaultDescription
align'left'|'right'|'center''left'Horizontal text alignment of the cell content.
mutedbooleanfalseUses text.secondary instead of text.primary.
nowrapbooleantrueKeeps the cell content on a single line when true.

More Andromeda components