Table
Rows and columns for comparing many records at once.
- Status
- ReadyBuild day 18 of 21
- Code
- In React
- Role
- Display
Usage
This demo is live, and the code below it is the same code, imports included. The component lives in src/ui of this repository and is not published to npm yet.
| Customer | Date | Status |
|---|---|---|
| Andi P. | 18 Sep | Successful |
| Sari W. | 17 Sep | Processing |
| Budi S. | 16 Sep | Failed |
| Rina K. | 15 Sep | Pending |
Pastes as editable layers. Shadows are not exported.
import { Status, Table, type TableColumn } from "@/ui";
const columns: TableColumn[] = [
{ key: "customer", header: "Customer" },
{ key: "status", header: "Status" },
];
const rows = [{ customer: "Andi P.", status: <Status status="success" size="sm" /> }];
export default function TableDemo() {
return <Table caption="Recent transfers" type="striped" columns={columns} rows={rows} />;
}Variants and states
Every specimen is the real component from src/ui, held in one state.
| Customer | Date | Status |
|---|---|---|
| Andi P. | 18 Sep | Successful |
| Sari W. | 17 Sep | Processing |
| Budi S. | 16 Sep | Failed |
| Rina K. | 15 Sep | Pending |
| Customer | Date | Status |
|---|---|---|
| Andi P. | 18 Sep | Successful |
| Sari W. | 17 Sep | Processing |
| Budi S. | 16 Sep | Failed |
| Rina K. | 15 Sep | Pending |
| Customer | Date | Status |
|---|---|---|
| Andi P. | 18 Sep | Successful |
| Sari W. | 17 Sep | Processing |
| Budi S. | 16 Sep | Failed |
| Rina K. | 15 Sep | Pending |
| Customer | Date | Status |
|---|---|---|
| Andi P. | 18 Sep | Successful |
| Sari W. | 17 Sep | Processing |
| Budi S. | 16 Sep | Failed |
| Rina K. | 15 Sep | Pending |
| Customer | Date | Status |
|---|---|---|
| Andi P. | 18 Sep | Successful |
| Sari W. | 17 Sep | Processing |
| Budi S. | 16 Sep | Failed |
| Rina K. | 15 Sep | Pending |
| Customer | Date | Status |
|---|---|---|
| Andi P. | 18 Sep | Successful |
| Sari W. | 17 Sep | Processing |
| Budi S. | 16 Sep | Failed |
| Rina K. | 15 Sep | Pending |
| Customer | Date | Status |
|---|---|---|
| Andi P. | 18 Sep | Successful |
| Sari W. | 17 Sep | Processing |
| Budi S. | 16 Sep | Failed |
| Rina K. | 15 Sep | Pending |
| Customer | Date | Status |
|---|---|---|
| Andi P. | 18 Sep | Successful |
| Sari W. | 17 Sep | Processing |
| Budi S. | 16 Sep | Failed |
| Rina K. | 15 Sep | Pending |
| Customer | Date | Status |
|---|---|---|
| Andi P. | 18 Sep | Successful |
| Sari W. | 17 Sep | Processing |
| Budi S. | 16 Sep | Failed |
| Rina K. | 15 Sep | Pending |
Pastes as editable layers. Shadows are not exported.
Props
- caption
- string · default none
- Required. Describes the table for screen readers.
- showCaption
- boolean · default false
- Shows the caption above the table.
- columns
- { key, header, align? }[] · default none
- Required.
- rows
- Record<string, ReactNode>[] · default none
- Required.
- type
- "basic" | "striped" | "bordered" · default "basic"
- size
- "sm" | "md" | "lg" · default "md"
- Row height 32, 40, 48.
- stroke
- boolean · default true
- Outer border.
- selectedRow
- number · default none
- Index of the selected row.
Figma to code
Figma properties by their exact names from Naming, and the React prop that carries each one. The table covers the shared properties that bear on this component; the Figma file decides which of them its component exposes. None means there is no prop for it yet.
- Table Cell · Type
- columns
- Header cells come from columns, body cells from rows.
- 🧰 Type
- type
- basic, striped, or bordered.
- 📐 Size
- size
- sm, md, or lg.
- Stroke
- stroke
- Boolean.
Accessibility
What the code in src/ui does today, and what it leaves to you.
Keyboard
- Scrolls sideways on its own when narrow; the scroll area is reachable.
Screen readers
- A native table with a caption and th scope=col, so each cell is read with its column.
What you still need to do
- Put an action in a row as a real button or link, with a name that says which row it acts on.
When to use
Built for scanning, sorting, and comparing records. Put the deciding column first.
Do and don't
Do
- Right-align numbers so they line up.
- Show an empty state and a loading state for the table body.
Don't
- Add columns because the component supports them.
- Cut off columns on mobile: let the table scroll inside its container.
Related
4 of 28 other molecules, same role and ready ones first.
- AccordionStacked sections that expand to reveal their content.Ready
- CardA container that groups related content and actions.Ready
- DividerA thin line used to separate content into distinct sections.Ready
- Empty StateCommunicates that there is no content to show, with a next step.Ready
Status reflects the component tracker snapshot of 29 October 2026.