A data table whose rows glide to their new slots when sorted and fade in place when filtered, with sortable headers, a tinted sorted column, tri-state selection and a footer that turns into your actions.
pnpm dlx shadcn@latest add @beautiful-ui-pro/data-tableNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Import it and pass your content. The props that matter most are listed next.
import { DataTable, StatusCell, type DataColumn } from "@/components/ui/notchset/data-table";
type Run = { id: string; agent: string; status: "ok" | "fail"; cost: number };
const columns: DataColumn<Run>[] = [
{ key: "id", header: "RUN", width: "110px" },
{ key: "agent", header: "AGENT", width: "minmax(110px,1fr)", sortable: true },
{ key: "status", header: "STATUS", width: "96px", cell: (r) => <StatusCell status={r.status} /> },
{ key: "cost", header: "COST", width: "90px", align: "end", sortable: true, cell: (r) => `$${r.cost.toFixed(4)}` },
];
const runs: Run[] = [
{ id: "run_8f3a1", agent: "Planner", status: "ok", cost: 0.0021 },
{ id: "run_8f3a2", agent: "Triage", status: "fail", cost: 0.0007 },
];
export function RunsTable() {
return <DataTable columns={columns} rows={runs} defaultSort={{ key: "cost", dir: -1 }} />;
}columns–
{ key, header, width, align?, sortable?, sortValue?, cell? }[]Grid tracks and cells.
rows–
{ id }[]Every row.
visible–
(row) => booleanWhich rows pass your filters.
defaultSort–
{ key, dir }Starting sort.
selected / onSelectedChange–
string[]Selection.
footer / selectionActions–
render functionsThe footer at rest, and while rows are selected.
components/ui/notchset/data-table.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.