A TanStack Table grid: sorting, pagination, selection, column menus, pinning, resizing, expandable rows, totals, loading, virtual rows.
| Patrol dog 0000 | Patrolling | North gate | 12 % | 120 km |
| Courier 9E37 | Needs attention | Hall B | 49 % | 173 km |
| Courier 3C6E | Offline | Warehouse 3 | 86 % | 226 km |
| Patrol dog DAA6 | Docked | Parking lot | 35 % | 279 km |
| Courier 78DD | Stopped | Perimeter | 72 % | 332 km |
| Courier 1715 | Patrolling | North gate | 21 % | 385 km |
| Patrol dog B54C | Needs attention | Hall B | 58 % | 438 km |
| Courier 5384 | Offline | Warehouse 3 | 95 % | 491 km |
Data grid default
Install
npx shadcn add @syncrobotic/data-grid Also installs: @tanstack/react-table@^9, @tanstack/react-virtual, lucide-react, @syncrobotic/cn, @syncrobotic/checkbox, @syncrobotic/dropdown-menu, @syncrobotic/pagination, @syncrobotic/use-presence, @syncrobotic/table
Overview
A full data table built on TanStack Table: you own the table state; DataGrid, DataGridTable and their parts draw it in the kit's style.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
| Patrol dog 0000 | Patrolling | North gate | 12 % | 120 km | |
| Courier 9E37 | Needs attention | Hall B | 49 % | 173 km | |
| Courier 3C6E | Offline | Warehouse 3 | 86 % | 226 km | |
| Patrol dog DAA6 | Docked | Parking lot | 35 % | 279 km | |
| Courier 78DD | Stopped | Perimeter | 72 % | 332 km | |
| Courier 1715 | Patrolling | North gate | 21 % | 385 km | |
| Patrol dog B54C | Needs attention | Hall B | 58 % | 438 km | |
| Courier 5384 | Offline | Warehouse 3 | 95 % | 491 km |
Data grid selection
| Patrol dog 0000 | Patrolling | North gate | 12 % | 120 km |
| Courier 9E37 | Needs attention | Hall B | 49 % | 173 km |
| Courier 3C6E | Offline | Warehouse 3 | 86 % | 226 km |
| Patrol dog DAA6 | Docked | Parking lot | 35 % | 279 km |
| Courier 78DD | Stopped | Perimeter | 72 % | 332 km |
| Courier 1715 | Patrolling | North gate | 21 % | 385 km |
| Patrol dog B54C | Needs attention | Hall B | 58 % | 438 km |
| Courier 5384 | Offline | Warehouse 3 | 95 % | 491 km |
Data grid dense
| Patrol dog 0000 | Patrolling | North gate | 12 % | 120 km |
| Courier 9E37 | Needs attention | Hall B | 49 % | 173 km |
| Courier 3C6E | Offline | Warehouse 3 | 86 % | 226 km |
| Patrol dog DAA6 | Docked | Parking lot | 35 % | 279 km |
| Courier 78DD | Stopped | Perimeter | 72 % | 332 km |
| Courier 1715 | Patrolling | North gate | 21 % | 385 km |
Data grid striped
| Patrol dog 0000 | Patrolling | North gate | 12 % | 120 km |
| Courier 9E37 | Needs attention | Hall B | 49 % | 173 km |
| Courier 3C6E | Offline | Warehouse 3 | 86 % | 226 km |
| Patrol dog DAA6 | Docked | Parking lot | 35 % | 279 km |
| Courier 78DD | Stopped | Perimeter | 72 % | 332 km |
| Courier 1715 | Patrolling | North gate | 21 % | 385 km |
Data grid cell borders
| Patrol dog 0000 | Patrolling | North gate |
| Courier 9E37 | Needs attention | Hall B |
| Courier 3C6E | Offline | Warehouse 3 |
| Patrol dog DAA6 | Docked | Parking lot |
| Courier 78DD | Stopped | Perimeter |
Data grid borderless
48 robots
| Patrol dog 0000 | Patrolling | North gate | 12 % |
| Courier 9E37 | Needs attention | Hall B | 49 % |
| Courier 3C6E | Offline | Warehouse 3 | 86 % |
| Patrol dog DAA6 | Docked | Parking lot | 35 % |
| Courier 78DD | Stopped | Perimeter | 72 % |
| Courier 1715 | Patrolling | North gate | 21 % |
Data grid column visibility menu
| Details | |||
|---|---|---|---|
| Patrol dog 0000 | Patrolling | North gate | |
| |||
| Courier 9E37 | Needs attention | Hall B | |
| Courier 3C6E | Offline | Warehouse 3 | |
| Patrol dog DAA6 | Docked | Parking lot | |
| Courier 78DD | Stopped | Perimeter | |
| Courier 1715 | Patrolling | North gate | |
Data grid expandable rows
| Patrol dog 0000 | Patrolling | North gate | 12 % | 120 km | 0 |
| Courier 9E37 | Needs attention | Hall B | 49 % | 173 km | 11 |
| Courier 3C6E | Offline | Warehouse 3 | 86 % | 226 km | 22 |
| Patrol dog DAA6 | Docked | Parking lot | 35 % | 279 km | 3 |
| Courier 78DD | Stopped | Perimeter | 72 % | 332 km | 14 |
| Courier 1715 | Patrolling | North gate | 21 % | 385 km | 25 |
Robot stays pinned while the rest scrolls. Drag a column edge to resize; double-click resets it.
Data grid pinned and resizable
| Patrol dog 0000 | Patrolling | North gate | 12 % | 120 km |
| Courier 9E37 | Needs attention | Hall B | 49 % | 173 km |
| Courier 3C6E | Offline | Warehouse 3 | 86 % | 226 km |
| Patrol dog DAA6 | Docked | Parking lot | 35 % | 279 km |
| Courier 78DD | Stopped | Perimeter | 72 % | 332 km |
| Courier 1715 | Patrolling | North gate | 21 % | 385 km |
| Patrol dog B54C | Needs attention | Hall B | 58 % | 438 km |
| Courier 5384 | Offline | Warehouse 3 | 95 % | 491 km |
| Courier F1BB | Docked | Parking lot | 44 % | 544 km |
| Patrol dog 8FF3 | Stopped | Perimeter | 81 % | 597 km |
| Courier 2E2A | Patrolling | North gate | 30 % | 650 km |
| Courier CC62 | Needs attention | Hall B | 67 % | 703 km |
| Patrol dog 6A99 | Offline | Warehouse 3 | 16 % | 756 km |
| Courier 08D1 | Docked | Parking lot | 53 % | 809 km |
| Courier A708 | Stopped | Perimeter | 90 % | 862 km |
| Patrol dog 4540 | Patrolling | North gate | 39 % | 915 km |
| Courier E377 | Needs attention | Hall B | 76 % | 968 km |
| Courier 81AF | Offline | Warehouse 3 | 25 % | 121 km |
| Patrol dog 1FE6 | Docked | Parking lot | 62 % | 174 km |
| Courier BE1E | Stopped | Perimeter | 99 % | 227 km |
| Courier 5C55 | Patrolling | North gate | 48 % | 280 km |
| Patrol dog FA8C | Needs attention | Hall B | 85 % | 333 km |
| Courier 98C4 | Offline | Warehouse 3 | 34 % | 386 km |
| Courier 36FB | Docked | Parking lot | 71 % | 439 km |
| Patrol dog D533 | Stopped | Perimeter | 20 % | 492 km |
| Courier 736A | Patrolling | North gate | 57 % | 545 km |
| Courier 11A2 | Needs attention | Hall B | 94 % | 598 km |
| Patrol dog AFD9 | Offline | Warehouse 3 | 43 % | 651 km |
| Courier 4E11 | Docked | Parking lot | 80 % | 704 km |
| Courier EC48 | Stopped | Perimeter | 29 % | 757 km |
| Patrol dog 8A80 | Patrolling | North gate | 66 % | 810 km |
| Courier 28B7 | Needs attention | Hall B | 15 % | 863 km |
| Courier C6EF | Offline | Warehouse 3 | 52 % | 916 km |
| Patrol dog 6526 | Docked | Parking lot | 89 % | 969 km |
| Courier 035E | Stopped | Perimeter | 38 % | 122 km |
| Courier A195 | Patrolling | North gate | 75 % | 175 km |
| Patrol dog 3FCD | Needs attention | Hall B | 24 % | 228 km |
| Courier DE04 | Offline | Warehouse 3 | 61 % | 281 km |
| Courier 7C3C | Docked | Parking lot | 98 % | 334 km |
| Patrol dog 1A73 | Stopped | Perimeter | 47 % | 387 km |
| Courier B8AB | Patrolling | North gate | 84 % | 440 km |
| Courier 56E2 | Needs attention | Hall B | 33 % | 493 km |
| Patrol dog F519 | Offline | Warehouse 3 | 70 % | 546 km |
| Courier 9351 | Docked | Parking lot | 19 % | 599 km |
| Courier 3188 | Stopped | Perimeter | 56 % | 652 km |
| Patrol dog CFC0 | Patrolling | North gate | 93 % | 705 km |
| Courier 6DF7 | Needs attention | Hall B | 42 % | 758 km |
| Courier 0C2F | Offline | Warehouse 3 | 79 % | 811 km |
Data grid sticky header
5 000 robots, only the rows in view are drawn.
Data grid virtual rows
Data grid loading
No robots match these filters. | ||||
Data grid empty
| Patrol dog 0000 | Patrolling | North gate | 12 % | 120 km |
| Courier 9E37 | Needs attention | Hall B | 49 % | 173 km |
| Courier 3C6E | Offline | Warehouse 3 | 86 % | 226 km |
| Patrol dog DAA6 | Docked | Parking lot | 35 % | 279 km |
| Courier 78DD | Stopped | Perimeter | 72 % | 332 km |
| Courier 1715 | Patrolling | North gate | 21 % | 385 km |
Data grid toolbar
13 of 40 robots
| Patrol dog DAA6 | Docked | Parking lot | 35 % | 279 km |
| Courier F1BB | Docked | Parking lot | 44 % | 544 km |
| Courier 08D1 | Docked | Parking lot | 53 % | 809 km |
| Patrol dog 4540 | Patrolling | North gate | 39 % | 915 km |
| Patrol dog 1FE6 | Docked | Parking lot | 62 % | 174 km |
| Courier 5C55 | Patrolling | North gate | 48 % | 280 km |
Data grid filtered
Usage rules
- Build the table with useTable, with dataGridFeatures in its features; DataGrid draws it.
- Keep data and columns stable (module scope or useMemo). A new array each render loops once a row expands.
- Numbers right-aligned (meta.align) and tabular.
- Status cells use InlineStatus, never a coloured badge.
- virtual needs a maxHeight.
Changelog
- 0.26.02026-11-21Needs @tanstack/react-table 9: build the table with useTable and dataGridFeatures; pinning is start/end. Keep the file's "use no memo". Looks the same.
- 0.23.32026-11-21A column's resize handle is named after the column ("Resize Robot", from meta.label or a plain-text header) instead of reading out the header function's source. Nothing to change in your code.
- 0.23.22026-11-21Compiles with noUncheckedIndexedAccess, as strict products build it; behaviour unchanged.