ExamplesFoundations
Minimal grid
The quick-start minimum (the core item alone, defaultData, zero app-side state).
The smallest working grid: one registry item, defaultData, and no app-side state. The grid
owns its rows internally. You only reach for data + onDataChange when you need to persist,
fetch, or react to edits.
pnpm dlx shadcn@latest add @gridcn/data-grid-minimal-demo
What's in the demo
<DataGrid>convenience wrapper: header, body, and viewport composed for youdefineColumnswith three built-in types:text,number,checkboxdefaultData: seed rows with nodata/onDataChangewiringgetRowId: stable row identity from the data itselfclassName: the grid takes a CSS box. Herew-full h-[240px]
Related
- Quick start: the same minimum, step by step
- Editable hero grid: the full composition