Sort
| Phase | Weeks |
|---|---|
| Identity | 4 |
| Strategy | 2 |
Sorts and presents structured records. Column headers expose aria-sort.
| Strategy | 2 |
| Identity | 4 |
| Digital | 6 |
| Phase | Weeks |
|---|---|
| Identity | 4 |
| Strategy | 2 |
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { DataTable } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/data-table.
npx @noorddev/vlak-cli add data-table
The StyleX leaf lands in components/vlak/ with its dependencies, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/data-table.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { DataTable } from "@noorddev/vlak-react";
<DataTable
columns={[
{ key: "phase", header: "Phase", sortable: true },
{ key: "weeks", header: "Weeks", sortable: true },
{ key: "owner", header: "Owner", render: (row) => row.owner.name },
]}
rows={rows}
rowKey={(row) => row.id}
emptyLabel="No phases yet."
/>Sortable rows over the plain rs-table.
| Keys | Does |
|---|---|
| Tab | Moves between the sort buttons |
| Enter, Space | Sorts ascending, then descending, then clears |
<table class="rs-table"><thead><tr><th><button class="rs-datatable-sort">Phase</button></th><th>Weeks</th></tr></thead><tbody><tr><td>Identity</td><td>4</td></tr><tr><td>Strategy</td><td>2</td></tr></tbody></table>