Sunburst
ProA radial hierarchy where each ring is a level and each arc a share of its parent.
pnpm dlx shadcn@latest add @caliper/sunburst| Path | Value |
|---|---|
| Cloud bill / Compute / Web servers | 18400 |
| Cloud bill / Compute / Workers | 9200 |
| Cloud bill / Compute / GPU jobs | 14100 |
| Cloud bill / Storage / Object storage | 7300 |
| Cloud bill / Storage / Databases / Primary | 6800 |
| Cloud bill / Storage / Databases / Replicas | 4100 |
| Cloud bill / Storage / Databases / Backups | 1900 |
| Cloud bill / Storage / Logs | 3200 |
| Cloud bill / Network / CDN | 5600 |
| Cloud bill / Network / Data transfer | 4400 |
| Cloud bill / Tooling / CI minutes | 2800 |
| Cloud bill / Tooling / Monitoring | 2100 |
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 #
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.
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.
API reference #
Sunburst
component
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.