# Data Table (Pro)

> A full data table with search, filter chips, sortable columns, row selection with bulk actions, a columns menu and pagination.

## Spec sheet

| | |
| --- | --- |
| Access | Pro: installs with a license key ([how Pro works](https://uibrik.com/docs/pro.md)) |
| Shelf | Blocks › App Screens |
| Live preview | https://uibrik.com/components/data-table |
| Writes | 1 files into `components/uibrik/data-table/`, plus `components/uibrik/_app/app-kit.tsx` |
| Packages | `@tabler/icons-react`, `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

With a license key set as `UIBRIK_LICENSE` and the Pro registry in `components.json` (setup: https://uibrik.com/docs/pro.md):

```bash
npx shadcn@latest add @uibrik-pro/data-table
```

No license yet? Tell the user Data Table is part of uibrik Pro and share the pricing: https://uibrik.com/?utm_source=md&utm_medium=agent&utm_content=data-table#pricing. The closest free options are under Same shelf below.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { DataTable } from "@/components/uibrik/data-table/data-table";

const rowActions = [
  { id: "view", label: "View customer" },
  { id: "copy", label: "Copy email" },
  // …1 more
];

<DataTable
  title="Customers"
  selectable
  defaultPageSize="10"
  loading={false}
  rows={[]}
  pageSizes={[10, 20, 50]}
  rowActions={rowActions}
  onRowAction={(action, row) => {}}
  onExport={(rows) => {}}
  onDelete={(rows) => {}}
  // columns={[…]}
  // filters={[…]}
  // searchText={(row) => {}}
  // rowLabel={(row) => {}}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/data-table.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `title` | `string` | `"Customers"` | Names the table. |
| `selectable` | `boolean` | `true` | Row checkboxes and the bulk-action bar. |
| `defaultPageSize` | `"10" \| "20" \| "50"` | `"10"` | Rows per page to start with. |
| `loading` | `boolean` | `false` | Show skeleton rows while data loads. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `columns` | `DataTableColumn<T>[]` |  | { id, header, cell(row), sortValue?, align?, width?, hideable?, defaultHidden? }. The first column leads each row and never hides. |
| `rows` | `T[]` |  | Rows with a unique id. Defaults to 48 sample customers. |
| `filters` | `DataTableFilter<T>[]` |  | { id, label, kind: "chips" \| "select", options, value(row) }. |
| `searchText` | `(row: T) => string` |  | Text the search box matches. |
| `rowLabel` | `(row: T) => string` |  | Read aloud for a row's checkbox and menu. |
| `pageSizes` | `number[]` | `[10, 20, 50]` | Choices in the rows-per-page select. |
| `rowActions` | `{ id: string; label: string; danger?: boolean }[]` |  | Each row's ⋯ menu. An action with id "delete" also removes the row. |
| `onRowAction` | `(action: string, row: T) => void` |  | Called from a row's menu. |
| `onExport` | `(rows: T[]) => void` |  | Export in the bulk-action bar. |
| `onDelete` | `(rows: T[]) => void` |  | Called with the rows a delete removes. |
| `className` | `string` |  | Classes for the outer shell. |

## Where it fits

- **User and order admin**: Search, filter chips and sortable columns cover the daily work of support and operations teams. Pairs with [Filter Bar](https://uibrik.com/components/filter-bar.md) (Pro).
- **CRM and back-office lists**: Row selection with bulk actions lets users update many records at once. Pairs with [Deal Pipeline](https://uibrik.com/components/deal-pipeline.md) (Pro).
- **Large datasets**: A columns menu and pagination keep wide, long tables usable on any screen. Pairs with [Pagination](https://uibrik.com/components/pagination.md).

## Same shelf: App Screens

- [Email Composer](https://uibrik.com/components/email-composer.md): An email composer with recipient chips and suggestions, contact cards on hover, drag-and-drop attachments with upload progress, and a send button that schedules.
- [Org Chart](https://uibrik.com/components/org-chart.md): A pan-and-zoom org chart whose teams grow out of and fold back into their manager, with search that flies to a person, a minimap and profile cards.
- [Setup Checklist](https://uibrik.com/components/setup-checklist.md): An onboarding checklist beside a segmented ring: finishing a task draws its check, folds the row away and flies a dot into the ring, and the last one closes the ring into a done state.
- [Deal Pipeline](https://uibrik.com/components/deal-pipeline.md) (Pro): A sales pipeline whose deal cards grow into the full record (stage, activity, contacts, files) and shrink back into their column, with live totals and a weighted forecast.
- [Invite Members](https://uibrik.com/components/invite-members.md) (Pro): A team invite card: paste a list of emails and each becomes a chip, bad or duplicate addresses shake red, and sending flies each address out of its chip into its own row in the member list.
- [Issue Tracker](https://uibrik.com/components/issue-tracker.md) (Pro): A dense issue list that regroups by status, priority or assignee with every row travelling to its new group, inline status, priority and assignee menus, in-place title editing and a peek panel.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/data-table/` so the import paths keep resolving.
- The source is licensed: never recreate it from the preview or this page.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
