Pro
Data cube
Three dimensions in one object: region by product by quarter. Pick which dimension is depth, step through its layers, and read the layer you are on as an ordinary table beside it, with the peak in bold.
pnpm dlx shadcn@latest add @caliper/data-cubeWhen to use
Use it for
- Data that really has three dimensions and people switch which one they slice by.
- Showing that a table is one slice of something larger.
Skip it when
- Two dimensions; use a heatmap or a pivot table.
- Reading exact values from the picture. The table is for that.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- The table is the answer
- The cube shows where you are in the data; the table holds the same numbers in full. A real slider with a value text steps the layers.
Styling
- Chosen layer forward, the rest dim
- Layers move along one axis and the others fade to 28 percent, so the slice you are reading is the one you can see.
Installation
pnpm dlx shadcn@latest add @caliper/data-cube
Adds its 7 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.
Usage
Import it from your copy of the source. The example behind the preview comes with the source.
import { DataCube } from "@/components/ui/data-cube"
The worked example comes with Pro
The 31-line example behind the preview opens here, ready to copy.
- 626 Pro parts, blocks and page templates, all with source
- $149 once, with lifetime updates. No renewal
- A full refund within 14 days if it is not for you
API reference
DataCube
component
Accessibility
It is built on native elements and keeps aria-hidden, aria-label, aria-valuetext and aria-live in step with state. Changes that matter are announced through a live region.
No custom key handling; Tab and the native activation keys do the work.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.
Related
- Heatmap matrixTwo categories against each other, coloured by value. The row and column follow the pointer or arrow keys, and choosing a step of the scale isolates its cells.
- Pivot tableSummarise 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.
- Skyline chartA day-by-time grid whose cells rise into columns. Seen from straight above it is an exact heatmap, and colour repeats every height so nothing is lost when it is flat. Tilt it up to see the shape of the week. The busiest cell is the one ember column.