Skip to main content

RingChart

Extruded allocation ring for the Industry theme — the glossy exception in an otherwise matte system.

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

When to use​

Extruded allocation ring for the Industry theme — the glossy exception in an otherwise matte system.

Accessibility​

Fully keyboard operable: Tab to focus, Enter/Space to activate. The visible focus ring uses --focus-ring — never remove it. Provide an accessible label (aria-label) for icon-only controls.

Install and import​

npx shadcn@latest add @prism/ring-chart
import { RingChart } from '@/components/prism/RingChart';

In a no-build prototype, read it from the bundle instead: const { RingChart } = window.PrismDesignSystem_39d121;

Props​

PropTypeRequiredDescription
dataRingDatum[]—
activeIndexnumber | null—Spotlight one segment by index; the rest dim. Default null (all lit).
sizenumber—Outer diameter in px.
thicknessnumber—Ring thickness in px. Thinner ring → larger clear centre for children.
gapnumber—Machined slot between segments, in degrees.
valueReact.ReactNode—Headline value shown at the centre.
labelReact.ReactNode—Small uppercase caption under the centre value.
childrenReact.ReactNode—Custom centre content, sized to the ring's inner circle. Overrides value/label — use for a rich readout (a heading + a control), e.g. <RingChart …><strong>Growth 30%</strong><button>NVDA, GOOG +22 ›</button></RingChart>.
showLegendboolean—
formatValue(v: number) =&gt; React.ReactNode—
captionstring—Accessible name and data-table caption.