crucıble

Docket

Full-featured client-side data table block on a real <table>: debounced search with highlighted matches, per-column filter checklists, column visibility and density, tri-state sorting where rows FLIP to their new positions, shift-click range selection with a spring-up bulk action bar (rolling count, confirm-to-delete), expandable detail rows, sticky header and first column, rolling pagination, an empty state, and roving arrow-key focus with aria-sort and live announcements.

motionpro

Installation

CLI

npx shadcn@latest add @crucible/docket

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
columnsDocketColumn<R>[]sample deployment columnsColumn definitions, in display order. The first column is sticky.
rowsR[]120 seeded sample deploymentsData rows (client-side; tuned for ~50–500).
getRowId(row: R) => stringrow => String(row.id)Stable row id.
selectedIdsstring[]Controlled selection (row ids). Pair with onSelectionChange.
onSelectionChange(ids: string[], rows: R[]) => voidFires whenever the selection changes.
bulkActionsDocketBulkAction<R>[]Export / Archive / DeleteActions in the bulk bar that springs up once rows are selected.
onBulkAction(actionId: string, ids: string[], rows: R[]) => voidFires after any bulk action resolves.
renderDetail((row: R) => React.ReactNode) | falsea field list (sample data: deploy detail)Expanded-row detail panel. false disables expanding.
pageSizenumber25Initial rows per page.
pageSizeOptionsnumber[][10, 25, 50, 100]Choices in the page-size select.
density"compact" | "comfortable""comfortable"Initial row density.
maxHeightnumber440Max height of the scrolling table body (header stays sticky).
noun[string, string]["deployment", "deployments"]Singular / plural noun used in copy ("3 deployments selected").
nownumber | Datethe current time, read after mountReference time for relative dates.
accentColorstring"#67e8f9"Signature accent: sort arrows, selection, focus rings, progress, highlights.
labelstring"Deployments"Accessible table caption.
refReact.Ref<DocketHandle>Imperative handle — replay(), clearSelection().
classNamestring

Honors prefers-reduced-motion with a designed static fallback, and passes className through.