Component libraryData table

Data table

Pro

Sortable column controls, native row selection and a scrollable table.

npx shadcn@latest add @tidal-pro/data-table
Desktop viewport

Installation

Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.

Terminal
npx shadcn@latest add @tidal-pro/data-table

Import components/ui/tidal.css, components/ui/data-table.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.

Usage

Complete example source · Dependency and asset manifest

Loading the complete example…

API & behavior

Generic native table. Required caption, columns([{id,label,cell(row),sortable?,rowHeader?,align:start|end,width?}]), rows and getRowId returning unique nonempty strings. Root forwards native div attributes/ref. Caption is visually hidden; consumers may render a visible matching heading outside. Semantic col headers, optional row headers, aria-sort and native buttons; sort/onSortChange metadata cycle ascending→descending→unsorted. Consumers supply the actual sorted, filtered and paged row order; the component never silently transforms data or fetches records. Optional selection contains controlled selectedIds ReadonlySet, onSelectionChange, getRowLabel(defaultID) and isRowDisabled(selection only). Native checkbox inputs are44px with true mixed state; select-all affects only selectable rows currently supplied and preserves off-page/disabled IDs. No callback renders read-only disabled selection. Disabled blocks selection and sort controls; busy only marks the table aria-busy and does not disable actions. No named form fields or implicit submission is added by selection. Optional empty ReactNode(defaultNo results), minTableWidth(default640, invalid falls back640) and maxHeight(positivefinite pixels) control presentation. The named scroll region supports native horizontal/vertical keyboard scrolling; sticky header preserves column context. Full labels wrap; caller cell content owns its own controls and accessibility. Invalid or duplicate row/column IDs produce visible configuration feedback instead of ambiguous keys. All callbacks are consumer-owned; React state, routing, dialogs, requests, forms, sorting algorithms, page data and focus after replacing custom cell content belong to the consumer. Shared neutral tokens, finite bounded45ms row entrance, clear selected-row surfaces and static reduced motion. No request, storage, timer, global listener or automatic row action is introduced.

Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.

Building with an agent?Give it the installation guide and component catalog.