Controls

Activity Rings

Effect
Preview
Reduced motion

Simulates prefers-reduced-motion for the demo. Off follows your system setting.

Keyboard stepping

Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.

Activity Rings
Today's goals
  • Move420/600
  • Exercise24/30
  • Stand9/12

Activity Rings

Nested rings that each close toward their own goal.

Installation

npx shadcn@latest add ikislay/pixel-ui/activity-rings

How to use

import { ActivityRings } from "@/components/ui/activity-rings"
const data = [
{ label: "Move", value: 420, max: 600 },
{ label: "Exercise", value: 24, max: 30 },
{ label: "Stand", value: 9, max: 12 },
]
export function Demo() {
return <ActivityRings label="Today's goals" data={data} />
}

Source Code

// Loading…

Props

Options you can pass to customize this component.

Prop
Type
Description
data*
{ label: string; value: number; max?: number; color?: string }[]

One ring per entry, outermost first. Max defaults to 100.

label*
string

Names the chart for screen readers and captions its data table.

format
(value: number) => string

Formats each value and goal in the list. Defaults to whole numbers.

thickness
number

Width of each ring, on a 200 unit wide chart.

className
string

Merged onto the root element.