caliper uidocs

Sunburst

Pro

A radial hierarchy where each ring is a level and each arc a share of its parent.

Installs components/ui/sunburst.tsxDepends on d3-shapeMotion none in component source
pnpm dlx shadcn@latest add @caliper/sunburst
Cloud spend by service
$79,900Cloud bill

Cloud spend by service
PathValue
Cloud bill / Compute / Web servers18400
Cloud bill / Compute / Workers9200
Cloud bill / Compute / GPU jobs14100
Cloud bill / Storage / Object storage7300
Cloud bill / Storage / Databases / Primary6800
Cloud bill / Storage / Databases / Replicas4100
Cloud bill / Storage / Databases / Backups1900
Cloud bill / Storage / Logs3200
Cloud bill / Network / CDN5600
Cloud bill / Network / Data transfer4400
Cloud bill / Tooling / CI minutes2800
Cloud bill / Tooling / Monitoring2100

When to use #

Use it for

  • Showing how a total splits across two or three nested levels, such as region, product and plan.
  • The part-to-whole story matters more than exact values.

Skip it when

  • There are more than three levels; a treemap reads more easily.
  • Readers need to compare close values; use bars.

Installation #

terminal
pnpm dlx shadcn@latest add @caliper/sunburst

Adds its 3 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 { Sunburst } from "@/components/ui/sunburst"

The worked example comes with Pro

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

Checking your licence…

API reference #

Sunburst

component
PropTypeDefault
label *string—
root *SunburstNode—
unitstring""
formatValue((value: number) => string)numberText
loadingboolean—
errorstring—
classNamestring—

Accessibility #

It exposes group and status semantics, with aria-label, aria-busy, aria-hidden and aria-current kept 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.