# Shadcn Card Container

> Data grid with card 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-19
- 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-19")`
- Registry item: https://reui.io/r/styles/base-nova/c-data-grid-19.json
- Uses: Avatar, Badge, Button, Card, Data Grid

## Best for

A Card with a Users title, an Add User action and the pager in its footer around the rows

## Agent notes

- Add User is a `Button` with no handler attached; connect it to your own create flow

## 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)

## Install

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

## 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.
