Skip to content
Design System
GitHub

Data grid

v0.26.0Beta

A TanStack Table grid: sorting, pagination, selection, column menus, pinning, resizing, expandable rows, totals, loading, virtual rows.

Patrol dog 0000PatrollingNorth gate
12 %
120 km
Courier 9E37Needs attentionHall B
49 %
173 km
Courier 3C6EOfflineWarehouse 3
86 %
226 km
Patrol dog DAA6DockedParking lot
35 %
279 km
Courier 78DDStoppedPerimeter
72 %
332 km
Courier 1715PatrollingNorth gate
21 %
385 km
Patrol dog B54CNeeds attentionHall B
58 %
438 km
Courier 5384OfflineWarehouse 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.

When to use

  • Fleets, events and datasets people sort, select and page through.
  • Bulk actions on selected rows.
  • Thousands of rows with virtual scrolling.
  • Rows that open a detail panel underneath.

Use something else

  • A handful of static rows: Table.
  • A list of things with actions, not columns: Item.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Patrol dog 0000PatrollingNorth gate
12 %
120 km
Courier 9E37Needs attentionHall B
49 %
173 km
Courier 3C6EOfflineWarehouse 3
86 %
226 km
Patrol dog DAA6DockedParking lot
35 %
279 km
Courier 78DDStoppedPerimeter
72 %
332 km
Courier 1715PatrollingNorth gate
21 %
385 km
Patrol dog B54CNeeds attentionHall B
58 %
438 km
Courier 5384OfflineWarehouse 3
95 %
491 km

Data grid selection

Patrol dog 0000PatrollingNorth gate
12 %
120 km
Courier 9E37Needs attentionHall B
49 %
173 km
Courier 3C6EOfflineWarehouse 3
86 %
226 km
Patrol dog DAA6DockedParking lot
35 %
279 km
Courier 78DDStoppedPerimeter
72 %
332 km
Courier 1715PatrollingNorth gate
21 %
385 km
Patrol dog B54CNeeds attentionHall B
58 %
438 km
Courier 5384OfflineWarehouse 3
95 %
491 km

Data grid dense

Patrol dog 0000PatrollingNorth gate
12 %
120 km
Courier 9E37Needs attentionHall B
49 %
173 km
Courier 3C6EOfflineWarehouse 3
86 %
226 km
Patrol dog DAA6DockedParking lot
35 %
279 km
Courier 78DDStoppedPerimeter
72 %
332 km
Courier 1715PatrollingNorth gate
21 %
385 km

Data grid striped

Patrol dog 0000PatrollingNorth gate
12 %
120 km
Courier 9E37Needs attentionHall B
49 %
173 km
Courier 3C6EOfflineWarehouse 3
86 %
226 km
Patrol dog DAA6DockedParking lot
35 %
279 km
Courier 78DDStoppedPerimeter
72 %
332 km
Courier 1715PatrollingNorth gate
21 %
385 km

Data grid cell borders

Patrol dog 0000PatrollingNorth gate
Courier 9E37Needs attentionHall B
Courier 3C6EOfflineWarehouse 3
Patrol dog DAA6DockedParking lot
Courier 78DDStoppedPerimeter

Data grid borderless

48 robots
Patrol dog 0000PatrollingNorth gate
12 %
Courier 9E37Needs attentionHall B
49 %
Courier 3C6EOfflineWarehouse 3
86 %
Patrol dog DAA6DockedParking lot
35 %
Courier 78DDStoppedPerimeter
72 %
Courier 1715PatrollingNorth gate
21 %

Data grid column visibility menu

Details
Patrol dog 0000PatrollingNorth gate
Battery
12 %
Odometer
120 km
Tasks today
0
Courier 9E37Needs attentionHall B
Courier 3C6EOfflineWarehouse 3
Patrol dog DAA6DockedParking lot
Courier 78DDStoppedPerimeter
Courier 1715PatrollingNorth gate

Data grid expandable rows

Patrol dog 0000PatrollingNorth gate
12 %
120 km0
Courier 9E37Needs attentionHall B
49 %
173 km11
Courier 3C6EOfflineWarehouse 3
86 %
226 km22
Patrol dog DAA6DockedParking lot
35 %
279 km3
Courier 78DDStoppedPerimeter
72 %
332 km14
Courier 1715PatrollingNorth gate
21 %
385 km25

Robot stays pinned while the rest scrolls. Drag a column edge to resize; double-click resets it.

Data grid pinned and resizable

Patrol dog 0000PatrollingNorth gate
12 %
120 km
Courier 9E37Needs attentionHall B
49 %
173 km
Courier 3C6EOfflineWarehouse 3
86 %
226 km
Patrol dog DAA6DockedParking lot
35 %
279 km
Courier 78DDStoppedPerimeter
72 %
332 km
Courier 1715PatrollingNorth gate
21 %
385 km
Patrol dog B54CNeeds attentionHall B
58 %
438 km
Courier 5384OfflineWarehouse 3
95 %
491 km
Courier F1BBDockedParking lot
44 %
544 km
Patrol dog 8FF3StoppedPerimeter
81 %
597 km
Courier 2E2APatrollingNorth gate
30 %
650 km
Courier CC62Needs attentionHall B
67 %
703 km
Patrol dog 6A99OfflineWarehouse 3
16 %
756 km
Courier 08D1DockedParking lot
53 %
809 km
Courier A708StoppedPerimeter
90 %
862 km
Patrol dog 4540PatrollingNorth gate
39 %
915 km
Courier E377Needs attentionHall B
76 %
968 km
Courier 81AFOfflineWarehouse 3
25 %
121 km
Patrol dog 1FE6DockedParking lot
62 %
174 km
Courier BE1EStoppedPerimeter
99 %
227 km
Courier 5C55PatrollingNorth gate
48 %
280 km
Patrol dog FA8CNeeds attentionHall B
85 %
333 km
Courier 98C4OfflineWarehouse 3
34 %
386 km
Courier 36FBDockedParking lot
71 %
439 km
Patrol dog D533StoppedPerimeter
20 %
492 km
Courier 736APatrollingNorth gate
57 %
545 km
Courier 11A2Needs attentionHall B
94 %
598 km
Patrol dog AFD9OfflineWarehouse 3
43 %
651 km
Courier 4E11DockedParking lot
80 %
704 km
Courier EC48StoppedPerimeter
29 %
757 km
Patrol dog 8A80PatrollingNorth gate
66 %
810 km
Courier 28B7Needs attentionHall B
15 %
863 km
Courier C6EFOfflineWarehouse 3
52 %
916 km
Patrol dog 6526DockedParking lot
89 %
969 km
Courier 035EStoppedPerimeter
38 %
122 km
Courier A195PatrollingNorth gate
75 %
175 km
Patrol dog 3FCDNeeds attentionHall B
24 %
228 km
Courier DE04OfflineWarehouse 3
61 %
281 km
Courier 7C3CDockedParking lot
98 %
334 km
Patrol dog 1A73StoppedPerimeter
47 %
387 km
Courier B8ABPatrollingNorth gate
84 %
440 km
Courier 56E2Needs attentionHall B
33 %
493 km
Patrol dog F519OfflineWarehouse 3
70 %
546 km
Courier 9351DockedParking lot
19 %
599 km
Courier 3188StoppedPerimeter
56 %
652 km
Patrol dog CFC0PatrollingNorth gate
93 %
705 km
Courier 6DF7Needs attentionHall B
42 %
758 km
Courier 0C2FOfflineWarehouse 3
79 %
811 km

Data grid sticky header

5 000 robots, only the rows in view are drawn.

Data grid virtual rows

Patrol dog 0000Patrolling120 km0
Courier 9E37Needs attention173 km11
Courier 3C6EOffline226 km22
Patrol dog DAA6Docked279 km3
Courier 78DDStopped332 km14
Courier 1715Patrolling385 km25
Total1,515 km75

Data grid totals footer

Data grid loading

No robots match these filters.

Data grid empty

Patrol dog 0000PatrollingNorth gate
12 %
120 km
Courier 9E37Needs attentionHall B
49 %
173 km
Courier 3C6EOfflineWarehouse 3
86 %
226 km
Patrol dog DAA6DockedParking lot
35 %
279 km
Courier 78DDStoppedPerimeter
72 %
332 km
Courier 1715PatrollingNorth gate
21 %
385 km

Data grid toolbar

13 of 40 robots

Patrol dog DAA6DockedParking lot
35 %
279 km
Courier F1BBDockedParking lot
44 %
544 km
Courier 08D1DockedParking lot
53 %
809 km
Patrol dog 4540PatrollingNorth gate
39 %
915 km
Patrol dog 1FE6DockedParking lot
62 %
174 km
Courier 5C55PatrollingNorth 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.

How to upgrade