Pivot table preview
Explore supplied aggregates by row group and column with exact totals and expandable segments.
pro · Data · composite
When to use
- Use it when a page needs explore supplied aggregates by row group and column with exact totals and expandable segments.
- Choose it when the data structure, labels, and state are supplied by the application and must remain consumer controlled.
Alternatives
- Choose data-table instead when sortable column controls, native row selection and a scrollable table is the actual interface need, rather than pivot table.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/pivot-tableImport components/ui/tidal.css, components/ui/pivot-table.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/pivot-table.css";
import{TidalPivotTable}from"./components/ui/pivot-table";
export default(p:Parameters<typeof TidalPivotTable>[0])=><div className="tidal-scope"><TidalPivotTable {...p}/></div>;API and props
TidalPivotTable.columns (required)ReadonlyArray<TidalPivotColumn>Required columns value accepted by this exported component.
TidalPivotTable.expandedIds (required)ReadonlyArray<string>Required expanded ids value accepted by this exported component.
TidalPivotTable.onExpandedChange (required)(ids: readonly string[], event: MouseEvent<HTMLButtonElement>) => voidCallback invoked when the expanded change interaction is proposed.
TidalPivotTable.onSelectedChange (required)(selection: TidalPivotSelection, event: MouseEvent<HTMLButtonElement>) => voidCallback invoked when the selected change interaction is proposed.
TidalPivotTable.rows (required)ReadonlyArray<TidalPivotRow>Required rows value accepted by this exported component.
TidalPivotTable.selected (required)TidalPivotSelection | nullRequired selected value accepted by this exported component.
TidalPivotTable.title (required)ReactNodeRequired title value accepted by this exported component.
TidalPivotTable.cellProps((row: TidalPivotRow, column: TidalPivotColumn) => ActionProps) | undefinedOptional cell props value accepted by this exported component.
TidalPivotTable.descriptionReactNodeOptional description value accepted by this exported component.
TidalPivotTable.disabledboolean | undefinedOptional disabled value accepted by this exported component.
TidalPivotTable.expandProps((row: TidalPivotRow) => ActionProps) | undefinedOptional expand props value accepted by this exported component.
TidalPivotTable.exportPropsActionProps | undefinedOptional export props value accepted by this exported component.
TidalPivotTable.formatValue((value: number) => string) | undefinedOptional format value value accepted by this exported component.
TidalPivotTable.grandTotalnumber | null | undefinedOptional grand total value accepted by this exported component.
TidalPivotTable.headingLevel"h2" | "h3" | "h4" | "h5" | "h6" | undefinedOptional heading level value accepted by this exported component.
TidalPivotTable.labelsPartial<{ row: string; total: string; totals: string; missing: string; empty: string; invalid: string; export: string; expand: string; collapse: string; selection: string; }> | undefinedOptional labels value accepted by this exported component.
TidalPivotTable.onExport((event: MouseEvent<HTMLButtonElement>) => void) | undefinedCallback invoked when the export interaction is proposed.
TidalPivotTable.totalsReadonly<Record<string, number | null | undefined>> | undefinedOptional totals value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- Supply truthful data and labels; the component does not fetch, aggregate, or persist records.