Data Table Grid
Advanced grid chrome for TanStack Table v9 — sticky pinned columns, resize handles, and sort/pin headers. Pair with the basic Data Table docs when you only need sort, filter, and pagination.
Gallery
Filter, sort, pin, resize, and paginate in one grid — pin menus on headers, drag edges to resize.
Loading…
Installation
CLI
Also needs
npx @sonojs/ui@latest add button dropdown-menu tablenpm i @tanstack/react-table@^9.3.1 lucide-reactUsage
data-table-grid.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| DataTableGrid maxHeight | number · string | "min(28rem, 70vh)" | Viewport max height so sticky headers can scroll. |
| DataTableGridTable totalSize | number | - | Pass `table.getTotalSize()` for fixed layout + resize. |
| DataTableGridHead / Cell column + table | PinableColumn + PinTable | - | Applies sticky pin offsets and edge shadows. |
| DataTableColumnHeader title + column | string + column | - | Sort toggle and pin start/end/unpin menu. |
| DataTableResizeHandle header | Header | - | Column edge handle via `header.getResizeHandler()`. |
Related
- Data Table, basic sort, filter, and pagination examples
- Table, table chrome primitives
- Dropdown Menu, pin menu on column headers