Table
Rows of records with sorting and selection.
| Status | ||||
|---|---|---|---|---|
KSKristina Stan | Design lead | Active | 12 | |
MPMila Petrova | Product designer | Active | 8 | |
IGIvan Georgiev | Developer | Invited | 3 |
Add the source to a shadcn project
npx shadcn@latest add https://docs.atomus.io/r/table.jsonOpen in v0Installs the component source, its CSS and the Atomus tokens into components/atomus/. How the registry works
In Figma
Section titled “In Figma”From guidelines/components/table.md · Open in Figma: Table
Properties, variants and anatomy of the Figma components. React props use the same names.
Table header cell
Section titled “Table header cell”Column header with optional select-all checkbox and sort.
Variants: 1
| Property | Type / options |
|---|---|
| Label | text |
| Checkbox | boolean (off) |
| Sortable | boolean (off) |
Table cell
Section titled “Table cell”Body cell: Text, Text + supporting, Avatar, Badge, Checkbox, Actions. Sizes sm (52) / md (72).
Variants: 12
| Property | Type / options |
|---|---|
| Text | text |
| Size | sm · md |
| Type | Text · Text + supporting · Avatar · Badge · Checkbox · Actions |
Filter bar
Section titled “Filter bar”Search, filters, sort and active-filter tags.
Variants: 2
| Property | Type / options |
|---|---|
| Breakpoint | Desktop · Mobile |
import { Table } from '@stanvision/atomus-react';
<Table caption="Team members" selectable rowKey={(r) => r.id} rows={members} columns={[ { key: 'name', header: 'Name', sortable: true }, { key: 'projects', header: 'Projects', sortable: true, align: 'end' }, ]}/>Rows of records with sortable columns and optional row selection. Pair with Filter bar above and Pagination below.
Props at a glance
Section titled “Props at a glance”Full types and defaults are in React API at the end of the page.
columns—{ key, header, sortable?, render?, supporting?, align?, width? };rows;rowKey.sizesm(52px rows) ·md(72px rows);selectable+selected/onSelectedChange;caption;empty(e.g. an EmptyState).- Use Avatar, Badge and tertiary Buttons inside
renderfor the Figma cell types.
Don’t
- Don’t put more than one primary action per row; group the rest in a DropdownMenu.
Design guidance
Section titled “Design guidance”From the Figma guidelines.
Do
- Build rows from Table cell types.
- Right-align numbers.
- Put Filter bar above the table and Pagination below.
Forbidden
- Never exceed 7–8 columns on desktop.
- Never wrap long text — truncate it and show the full text in a tooltip.
- Never combine zebra stripes and row borders.
React API
Section titled “React API”Generated from react/src/components by scripts/gen-react-api.mjs — the same tables agents read in guidelines/components/table.md.
Use only these props; anything else is not part of the API.
Figma: Table header cell + Table cell. Sorting is built in; filtering and pagination stay with the page (Filter bar, Pagination).
import { Table } from '@stanvision/atomus-react'; — source: react/src/components/Table.tsx
| Prop | Type | Default | Description |
|---|---|---|---|
columns |
TableColumn<Row>[] |
required | Column definitions. |
rows |
Row[] |
required | Row data. |
rowKey |
(row: Row) => string |
required | Returns a stable key for a row. |
size |
'sm' | 'md' |
'sm' |
Figma: Table cell Size — sm 52 · md 72 |
selectable |
boolean |
— | Figma: Table header cell — Checkbox; adds a select-all column |
selected |
string[] |
— | Keys of the selected rows (controlled). |
onSelectedChange |
(keys: string[]) => void |
— | Called with the selected row keys. |
caption |
string |
— | Accessible table caption |
empty |
ReactNode |
— | Rendered when rows is empty, e.g. an EmptyState |
className |
string |
— | Extra class on the root element (layout only — never restyle colours or sizes). |
Accepts only the props above.
TableColumn:
| Field | Type | Description |
|---|---|---|
key |
string |
|
header |
ReactNode |
Figma: Table header cell — Label |
sortable? |
boolean |
Figma: Table header cell — Sortable |
sortValue? |
(row: Row) => string | number |
Value used for sorting; defaults to row[key] |
render? |
(row: Row) => ReactNode |
Cell content; defaults to row[key]. Use Avatar, Badge or Buttons for the Figma cell types. |
supporting? |
(row: Row) => ReactNode |
Supporting text under the main text (Figma: Type=Text + supporting) |
align? |
'start' | 'end' |
|
width? |
number | string |