#491
Dense, pinned and grouped
A dense SimpleTable of leads inside an already framed, horizontally scrolling panel: compact rows, two pinned columns, collapsible stage groups, a sortable Name header and clickable rows.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Dense, pinned and grouped" pattern (@codeatlasdev/ui demo #491, display/table) in my app.
Call get_demo({ ids: ["#491"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: CRM or spreadsheet-like record lists that need many columns and rows: dense rows, pinned checkbox and name columns, grouped sections and keyboard-operable rows.
Keep these library parts, with the props and tokens the demo uses:
- SimpleTable, TableRow, TableGroupRow, TableSortHeader, Checkbox from "@codeatlasdev/ui"
Behaviour to keep:
- `<SimpleTable density="compact" frame={false} scroll="none" stickyColumns={2} headerCase="sentence">` inside a caller-owned `overflow-x: auto` panel
- `<TableSortHeader {sort} onsort={cycle}>` renders a sentence-case sortable header whose `sort` is `none`, `asc` or `desc`
- One `<tbody>` per stage with `<TableGroupRow colspan={6} collapsible bind:open={opened[stage]}>` as its first row
- `<TableRow selected={selected === l.id} onactivate=` rows: Tab, Enter/Space and click activate; the checkbox does not
- The first two columns (checkbox, name) stay pinned while the panel scrolls sideways
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- SimpleTable
@codeatlasdev/ui - TableRow
@codeatlasdev/ui - TableGroupRow
@codeatlasdev/ui - TableSortHeader
@codeatlasdev/ui - Checkbox
@codeatlasdev/ui
How it is built
- `<SimpleTable density="compact" frame={false} scroll="none" stickyColumns={2} headerCase="sentence">` inside a caller-owned `overflow-x: auto` panel
- `<TableSortHeader {sort} onsort={cycle}>` renders a sentence-case sortable header whose `sort` is `none`, `asc` or `desc`
- One `<tbody>` per stage with `<TableGroupRow colspan={6} collapsible bind:open={opened[stage]}>` as its first row
- `<TableRow selected={selected === l.id} onactivate=` rows: Tab, Enter/Space and click activate; the checkbox does not
- The first two columns (checkbox, name) stay pinned while the panel scrolls sideways
Related
Loading source.