caliper uidocs

Small multiples

Pro

A grid of the same chart for different groups.

Installs components/ui/small-multiples.tsxDepends on d3-shapeMotion none in component source
pnpm dlx shadcn@latest add @caliper/small-multiples
Tickets solved per team
Tickets solved per team
PeriodPlatformWebMobileDataSupportSalesDesignFinance
Jan5956536258505955
Feb6461596866545149
Mar6357636963544842
Apr6860636670534536
May7056657471554037
Jun7054637168594340
Jul6556597465583740
Aug6961658274503035
Sep6564628482473331
Oct7065599085423731
Nov7166619287393429
Dec7570649590373227

When to use #

Use it for

  • Comparing shapes across many groups.

Skip it when

  • A single series.

Installation #

terminal
pnpm dlx shadcn@latest add @caliper/small-multiples

Adds its 4 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.

example.tsx
import { SmallMultiples } from "@/components/ui/small-multiples"

The worked example comes with Pro

The 18-line example behind the preview opens here with a Pro or Team licence.

Checking your licence…

API reference #

SmallMultiples

component
PropTypeDefault
label *string—
series *readonly MultipleSeries[]—
xLabels *readonly string[]—
format((n: number) => string)(n) => n.toLocaleString("en-US")
classNamestring—

Accessibility #

It exposes img semantics, with aria-label, aria-pressed and aria-hidden kept in step with state.

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.