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
ClientPlanStatusMRRJoined
HE
Helio Energy
Studioactive12,400Mar 04
VE
Verba Editorial
Proactive4,800Feb 11
MB
Mara Booking
Propaused4,800Jan 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

PropTypeDefaultDescription
titleReactNodeOptional table title in display font.
actionsReactNodeRight-aligned action buttons in the head bar.
columnsTableColumn<T>[]Schema: { key, label, numeric?, kind?, render? }.
rowsT[]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.