TidalUI

Data table preview

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

pro · Data · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

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

Import components/ui/tidal.css, components/ui/data-table.css. Wrap installed components in tidal-scope.

Preview

Data table component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/data-table.css";
import{TidalDataTable}from"./components/ui/data-table";
export default()=><div className="tidal-scope"><TidalDataTable caption={"Demo"} columns={[{id:"example",label:"Demo",cell:() => "value"}]} getRowId={() => "value"} rows={[{ id: "example" }]}/></div>;

API and props

TidalDataTable.caption (required)
string

Required caption value accepted by this exported component.

TidalDataTable.columns (required)
ReadonlyArray<TidalTableColumn<T>>

Required columns value accepted by this exported component.

TidalDataTable.getRowId (required)
(row: T) => string

Required get row id value accepted by this exported component.

TidalDataTable.rows (required)
ReadonlyArray<T>

Required rows value accepted by this exported component.

TidalDataTable.busy
boolean | undefined

Optional busy value accepted by this exported component.

TidalDataTable.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalDataTable.empty
ReactNode

Optional empty value accepted by this exported component.

TidalDataTable.maxHeight
number | undefined

Optional max height value accepted by this exported component.

TidalDataTable.minTableWidth
number | undefined

Optional min table width value accepted by this exported component.

TidalDataTable.onSortChange
((sort: TidalTableSort | null) => void) | undefined

Callback invoked when the sort change interaction is proposed.

TidalDataTable.selection
TidalTableSelection<T> | undefined

Optional selection value accepted by this exported component.

TidalDataTable.sort
TidalTableSort | null | undefined

Optional sort value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas