Primitives
Table
Hairline rows, mono uppercase headers, tabular numbers right-aligned. Hover lights one row at a time.
installnpx shadcn@latest add https://br-design-system2.vercel.app/r/br-primitives.json
Preview
Clients
| Client | Plan | Status | MRR | Joined | |
|---|---|---|---|---|---|
| HE | Studio | active | €12,400 | Mar 04 | |
| VE | Pro | active | €4,800 | Feb 11 | |
| MB | Pro | paused | €4,800 | Jan 22 |
import { Table, Avatar, Badge, type TableColumn } from "@/components/br/primitives";
const columns: TableColumn<Row>[] = [
{
key: "user", label: "Client", kind: "user",
render: (r) => (
<>
<Avatar fallback={initials(r.name)} accent={r.status === "active"} />
<div className="meta">
<span className="name">{r.name}</span>
<span className="email">{r.email}</span>
</div>
</>
),
},
{ key: "mrr", label: "MRR", numeric: true,
render: (r) => <>€{r.mrr.toLocaleString()}</> },
];
<Table title="Clients" columns={columns} rows={rows} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | ReactNode | — | Optional table title in display font. |
| actions | ReactNode | — | Right-aligned action buttons in the head bar. |
| columns | TableColumn<T>[] | — | Schema: { key, label, numeric?, kind?, render? }. |
| rows | T[] | — | Row data. |
Notes
kind="user" turns the cell into a flex row (Avatar + .meta block). kind="actions" right-aligns + tightens for icon buttons. numeric right-aligns + applies tabular-nums.