Plan
The job
Phases in weeks. Hairline rows, no zebra hue.
| Phase | Weeks |
|---|---|
| Strategy | 2 |
| Identity | 4 |
Presents structured values in rows and columns. 1px row rules; total rows use 2px rules.
| Phase | Weeks |
|---|---|
| Strategy | 2 |
| Identity | 4 |
The job
Phases in weeks. Hairline rows, no zebra hue.
| Phase | Weeks |
|---|---|
| Strategy | 2 |
| Identity | 4 |
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 { Table, TableBody, TableHead, TableRow, TableTd, TableTh } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/table.
npx @noorddev/vlak-cli add table
The StyleX leaf lands in components/vlak/, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/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 { Table, TableBody, TableHead, TableRow, TableTd, TableTh } from "@noorddev/vlak-react";
<Table>
<TableHead>
<TableRow>
<TableTh scope="col">Phase</TableTh>
<TableTh scope="col">Weeks</TableTh>
</TableRow>
</TableHead>
<TableBody>
<TableRow>
<TableTd>Strategy</TableTd>
<TableTd>2</TableTd>
</TableRow>
<TableRow total>
<TableTd total>Total</TableTd>
<TableTd total>6</TableTd>
</TableRow>
</TableBody>
</Table>Open grid, 1px row rules, last column right-aligned.
Also accepts TableHTMLAttributes<HTMLTableElement>.
Also accepts HTMLAttributes<HTMLTableSectionElement>.
Also accepts HTMLAttributes<HTMLTableSectionElement>.
| Prop | Type | Default | Description |
|---|---|---|---|
total | boolean | 2px rules, ink cells. |
Also accepts HTMLAttributes<HTMLTableRowElement>.
| Prop | Type | Default | Description |
|---|---|---|---|
total | boolean |
Also accepts TdHTMLAttributes<HTMLTableCellElement>.
Also accepts ThHTMLAttributes<HTMLTableCellElement>.
<table class="rs-table"><thead><tr><th>Phase</th><th>Weeks</th></tr></thead><tbody><tr><td>Strategy</td><td>2</td></tr><tr><td>Identity</td><td>4</td></tr></tbody></table>