Data table
Filterable projects table with faceted status filters, sortable columns and a bulk-action bar; rows reflow with layout animations as you filter, sort, archive or delete.
Installation
Installation is available on the Startup and Business plans. Your personal install command appears here once you have access.
Usage
Import it, pass your props, and make it part of your product.
import { DataTable } from '@/components/component-kit/items/block-data-table';
export function Example() { return <DataTable onAction={(action, ids) => console.log(action, ids)} />;}Props
| Prop | Type | Default | Description |
|---|---|---|---|
rows | ProjectRow[] | 12 demo projects | Seed rows (id, name, slug, status, owner, updatedAt, progress); the block keeps its own state after mount. |
pageSize | number | 8 | Rows per page (5 when compact). |
onSelectionChange | (ids: string[]) => void | undefined | Called whenever the set of selected row ids changes. |
onAction | (action: "archive" | "delete", ids: string[]) => void | undefined | Called when a bulk action runs on the selected rows. |
compact | boolean | false | Five rows, no column menu or pagination footer. |
autoPlay | boolean | compact | Idle loop that toggles the Active status filter every 2.6s so rows reflow. |
contentClassName | string | undefined | Class for the portalled filter popover and column menu. |