Loading...
Loading...
Loading...
Sortable, selectable data table with column definitions and row actions.
Install
npx bouncekit@latest add datatableImport
import { DataTable } from "@/components/dashboard/data-table"| Role | ||
|---|---|---|
| Alice Johnson | alice@example.com | Admin |
| Bob Smith | bob@example.com | Member |
| Carol White | carol@example.com | Viewer |
API Reference
| Prop | Type | Required | Description |
|---|---|---|---|
columns | DataTableColumn<T>[] | yes | Column definitions. |
data | T[] | yes | Row data. Each item must have a unique id. |
onRowClick | (row: T) => void | — | Callback when a row is clicked. |
selectable | boolean | — | Enable row selection with checkboxes. |
Source
src/components/dashboard/data-table.tsx