Three goal rings in ink tones. Hover isolates one ring and its legend, and closing all three shows a success Badge.
FreeWeb and MobileMotion
Preview
npx shadcn add @fetaui/activity-ringsPlayground3 of 3 tracked
Activity
Thursday, Oct 29
Default3 of 3 tracked
Activity
Thursday, Oct 29
HoverExercise · 140%
Activity
Thursday, Oct 29
CompleteAll rings closed
Activity
Thursday, Oct 29
State
Icons animation
Motion
Installation
Terminal· bash
npx shadcn add @fetaui/activity-rings
Accessibility
- The rings carry a text summary like Move 479 of 800 calories.
- Legend rows are buttons with aria-pressed.
- Every value is also shown as text, so nothing relies on the tone of a ring.
Motion
- Rings sweep from 12 o’clock in 800 ms, 80 ms apart, the first time they scroll into view.
- A ring past its goal draws a second lap on top, then settles.
- Hover fades the other rings to 25% in 150 ms and lifts the legend row to 5% ink.
- The success Badge pops in when every ring closes.
- With reduced motion, rings appear at their value.
Responsive behavior
- 418 px on Web, with the legend beside the rings.
- 358 px on Mobile, with the rings above a full width legend.
Performance
- The sweep runs once, when the rings first enter the viewport.
- The lap past 100% mounts only for rings over their goal, and never when still.
- Numbers count by writing text directly, so they never re-render per frame.
Note for AI
Give your coding assistant the Markdown reference instead of screenshots.
- Import ActivityRings from @/components/fetaui/activity-rings. Without rings it shows sample data from ACTIVITY_RINGS.
- Only the first three rings draw. Pass value and goal as real numbers, and let value pass goal so the lap shows.
- Leave active out to follow hover and focus. defaultActive pins a ring, and a click on the legend toggles the pin.
- date defaults to a sample string, so always pass it. Composes Card, Badge and CountUp.
Related
Spending RingComponentA monochrome donut. The selected category is ink and thicker, and the center reads it.Liquid GaugeComponentA quota as liquid in a circle: it rises to its level, sloshes and settles.Activity TerrainComponentA contribution grid in five ink steps that rises into an isometric terrain.Metric CardComponentOne number with its trend, a period switch, and the segments behind it.Bento WidgetComponentOne dashboard tile in three sizes: Revenue, Active users, Activity, Notes, Uptime and Storage, in ink steps.