Skip to content

Grove

Donut Chart

Parts of a whole as a ring with a legend, or a half-ring gauge for one share of a goal.

Live, interactive React component · light themeResponsive

About the Grove Donut Chart

Parts of a whole as a ring, with the total in the hole and a legend that lists every part with its colour key, value and percent. Slices take the chart colours in order with 2 px gaps; with six or more segments the fifth and later fold into one grey "Other". variant="gauge" draws a half ring for one share of a total ("72% of goal") over an empty track. The legend sits beside the ring and drops under it when the card is narrow; with the legend off the same list stays for screen readers. Sort the segments from the largest down, and use a BarList instead when there are more than five parts worth naming.

It is part of Grove: white cards on sage, pastel chips, pine green. The style’s 135 pieces share one set of tokens, type and motion, in a light and a dark theme, so whatever you take from it fits together.

To put it in your project, copy the prompt into Claude Code, OpenAI Codex or Cursor, or add it by hand. The documentation walks through both.