Playground example
Try one grid with the toolbar, context menu, fill handle, and undo, and switch row markers, validation, read-only, RTL, streaming, and the data mode live.
This grid combines the main add-ons. The controls switch single features on and off.
pnpm dlx shadcn@latest add @gridcn/data-grid-playground-demo
What the grid mounts
Every data mode mounts the toolbar, the context menu, the header dropdown, the header filter, the fill handle, the presence plugin, and the shortcuts dialog. The Shortcuts button in the toolbar opens that dialog. The toolbar holds search, a filter menu, a sort list, a columns menu, import, and export. Undo and redo mount in the virtualized mode only.
The Mode select picks the data mode. Only one is active at a time, and a switch remounts the grid:
virtualizedholds 60 local rows.paginatedpages 120 local rows, 20 per page, with client pagination.lazyruns scroll mode over 5,000 rows. A fake server answers each block after 300 ms. It applies the sort and ignores filters and search.
In lazy mode the import button, pinned totals, and streaming are off, because the grid holds only the loaded blocks.
Controls
| Control | What it changes | Page |
|---|---|---|
| Row markers | The marker column: numbers, checkboxes, or both. The reorder values add drag handles for row reordering. | Row markers |
| Custom marker | Your own marker cells. It needs a row marker mode other than none. | Row markers |
| Header click | What a click on a header does: select, sort, or nothing. | Pointer selection |
| Density | The row height. | Density |
| Validation | A rule on the Age column. A value under 18 shows the message Must be 18 or older. | Validation |
| Custom headers | Name and Score headers with a sort direction icon. | Column headers |
| Read-only | Locks the whole grid. | Lock cells |
| Loading | The loading display. | Loading state |
| RTL | Right-to-left layout. | Labels and i18n |
| Pinned totals | A totals row at the bottom of the grid: the row count under Name, the average Age, and the sum of Score. | Pinned rows |
| Presence | Two simulated peers that move across cells. | Show presence |
| Streaming | Random Score updates four times a second. A second switch sorts the rows as they change. | Stream updates |
Related
Fix install problems
Fix a failed shadcn install, imports that do not resolve, a missing tooltip provider, and a grid that renders nothing or without styles.
Use agent skills
Install five skills that teach Claude Code, Cursor, Codex, and other coding agents to tune, extend, wire, and upgrade gridcn grids.