# Shadcn CRUD in Frame

> Data grid with CRUD in frame container

- Type: example, free and open source (MIT)
- Component: [Data Grid](https://reui.io/components/data-grid.md)
- Page: https://reui.io/components/data-grid/c-data-grid-23
- Docs (Base UI): https://reui.io/docs/components/base/data-grid.md
- Docs (Radix UI): https://reui.io/docs/components/radix/data-grid.md
- MCP: `get_example("c-data-grid-23")`
- Registry item: https://reui.io/r/styles/base-nova/c-data-grid-23.json
- Uses: Avatar, Badge, Button, Checkbox, Data Grid, Dropdown Menu, Frame, Input Group, Label, Popover

## Best for

Search, a status filter and row actions in a dense stacked Frame titled Team members, with no column resizing

## Agent notes

- `ActionsCell` wires only Copy ID; its Edit and Delete items and the Add new button call nothing yet
- The search box and status filter narrow `demoData` in `filteredData`, so swap them for query params when rows come from an API

## When not to use

- Column widths the user drags to resize: use [CRUD Admin](https://reui.io/components/data-grid/c-data-grid-22.md) (`get_example("c-data-grid-22")`)

## Third-party libraries

- TanStack Table v9: [API reference](https://tanstack.com/table/v9/docs/framework/react/reference/index), [docs](https://tanstack.com/table/v9/docs/framework/react/quick-start)
- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/c-data-grid-23
```

## About Shadcn Data Grid

### When to use

- Admin and back office tables that sort, filter, paginate and select rows
- Spreadsheet style editing with cell selection, clipboard and inline edits
- Large record sets that need virtualized rows, columns or infinite scroll

### When not to use

- A short static list of rows with no sorting or paging: use [Table](https://reui.io/components/table.md) (`get_component("table")`)
- Records moved as cards between status columns: use [Kanban](https://reui.io/components/kanban.md) (`get_component("kanban")`)
- A folder or category hierarchy with no columns of data: use [Tree](https://reui.io/components/tree.md) (`get_component("tree")`)

### Agent notes

- With `manualPagination`, pass the server total to `useTable` as `rowCount` as well as `recordCount`, or the page buttons never render
- Give `useTable` a stable `getRowId` whenever rows can be pinned, reordered or virtualized
- Swap `DataGridTable` for `DataGridTableVirtual` when rows need virtualization or infinite scroll

Every ReUI item has a twin like this one; the index is https://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
