Pivot table
Summarise any records by the fields you choose: rows grouped one or two deep, a field across the columns, and the sum, average, count, minimum or maximum, with totals, sorting, shading and a grid you move through with the keyboard.
| Region / Customer | 2025 Q4 | 2026 Q1 | 2026 Q2 | 2026 Q3 | Total |
|---|---|---|---|---|---|
| Benelux | €39,940 | €43,035 | €43,945 | €44,855 | €171,775 |
| DACH | €7,175 | €6,035 | €7,080 | €8,125 | €28,415 |
| Iberia | €45,695 | €47,650 | €49,605 | €53,745 | €196,695 |
| UK & Ireland | €51,565 | €53,520 | €55,475 | €59,615 | €220,175 |
| Total | €144,375 | €150,240 | €156,105 | €166,340 | €617,060 |
When to use
- Finance and sales reports where people ask the next question themselves.
- Admin tools over exported data.
When not to use
- A fixed report everyone reads the same way; use a table or a chart.
Installation
pnpm dlx shadcn@latest add @caliper/pivot-table
Adds its 8 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
PivotTable
6 props
Keyboard
- Home
- Jumps to the first item or the minimum.
- End
- Jumps to the last item or the maximum.
- Enter
- Activates the focused control.
- Space
- Activates the focused control.
Accessibility
It exposes group, grid and status semantics, with aria-label, aria-hidden, aria-describedby, aria-sort and aria-expanded kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/pivot-table.mdThe index of every part is at /llms.txt.