Spend Donut, animated React component
A monthly budget donut: the slice you point at slides out of the ring and thickens while the centre rolls to its amount. Switch month and every slice re-measures itself in one continuous spring sweep.
- Pro
- Dashboards
- Hover
- Spring
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Spending
Oct total $3,760 of $4,000 budget
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| thickness | number | 18 | Ring thickness in px (220px viewBox). The pointed-at slice grows by 6. |
| gap | number | 4 | Clear space between slices in px; the round caps are accounted for. |
| autoplay | boolean | false | Points at each category in turn and changes month every ~8s until someone interacts. |