Skip to content
caliper ui docs

Pro

Box plot

Distributions side by side as five-number summaries with outliers. Switching to every value spreads the points out from the median on the same axis.

Pro
pnpm dlx shadcn@latest add @caliper/box-plot

Edge regions

São Paulo is the slowest and least steady; Frankfurt holds tight.

p50 latency by region
FrankfurtVirginiaOregonSingaporeSão Paulo

p50 latency by region
GroupMinQ1MedianQ3MaxOutliers
Frankfurt78127.5146.5183.2524511
Virginia105154.5171.5210.2524911
Oregon119174205249.2536210
Singapore98196226264.2529211
São Paulo147212.75260.5304.2534812
Installs components/ui/box-plot.tsxDepends on d3-shapeMotion none in component source

When to use

Use it for

  • Latency by region, deal size by segment, scores by cohort.
  • Comparing spread as well as the middle.

Skip it when

  • Readers new to quartiles; start with the histogram.
  • Tiny groups; with under ten values show the points.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/box-plot

Adds its 6 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. It is built from boxSummary and BoxPlot.

example.tsx
import { boxSummary, BoxPlot } from "@/components/ui/box-plot"

The worked example comes with Pro

The 38-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
Checking your licence…

API reference

boxSummary

component

No props of its own; it accepts the native props of its root element.

BoxPlot

component
PropTypeDefault
label *string—
groups *readonly BoxGroup[]—
unitstring""
formatValue((value: number) => string)numberText
view"points" | "box""box"
loadingboolean—
errorstring—
classNamestring—

Accessibility

It exposes group and status semantics, with aria-label, aria-busy and aria-hidden kept in step with state. Changes that matter are announced through a live region.

KeyBehaviour
↓Moves to the next item or value.
→Moves to the next item or value.
↑Moves to the previous item or value.
←Moves to the previous item or value.
EscapeCloses or cancels, then returns focus to where it came from.
HomeJumps to the first item or the minimum.
EndJumps to the last item or the maximum.

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.

All Distribution charts examples