Rebar UI

1.0

synthetic

PivotTable

A cross-tab that totals your records by a row and a column, with row and column totals.

Budget by team and statusSum of budget; every cell is several records collapsed
Budget by team and status (GBP)
teamOn trackReviewLateDoneTotal
Brand48200218000070000
Product0729000072900
Research00940009400
Operations00061506150
Total482009470094006150158450
One row
Brand only
teamOn trackReviewTotal
Brand482002180070000
Total482002180070000

In context

Finance summaryWhere the money is, at a glance
Budget by teamFive projects, October
Projects by team and status
teamOn trackReviewLateDoneTotal
Brand11002
Product01001
Research00101
Operations00011
Total12115

Props

PropTypeRequiredDefault
dataRecord<string, string | number>[]Yes—
rowFieldstringYes—
colFieldstringYes—
valueFieldstringYes—
aggregatePivotAggregate | undefinedNosum
formatValue((n: number) => string) | undefinedNo—
titlestring | undefinedNo—
classNamestring | undefinedNo—
aria-labelstring | undefinedNo—
bionicboolean | undefinedNo—
bionicOptionsBionicOptions | undefinedNo—

data-rebar-* attributes

data-rebar-component="pivot-table" on the root; renders through the real Table component underneath.

Migrating to Ant Design

AntD ships no dedicated pivot-table component of its own — a migration typically composes AntD's Table with the aggregation done ahead of time (the same shape this component already produces) or reaches for a dedicated library (e.g. react-pivottable) for drill-down.