Kinetik UI

Activity Rings

.md

Concentric progress rings that wind up one after another; a ring past its goal laps itself.

v1.0.0Live on web@shopify/react-native-skiareact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add activity-rings

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/activity-rings.json

Install manually

  1. Install dependencies
    npx expo install @shopify/react-native-skia react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/activity-rings.tsx
    View source files

Usage

import { ActivityRings } from '@/components/kinetik/activity-rings';

<ActivityRings
  accessibilityLabel="Today's activity"
  rings={[
    { key: 'move', label: 'Move', value: 420, goal: 600 },
    { key: 'steps', label: 'Steps', value: 9800, goal: 8000 },
    { key: 'focus', label: 'Focus', value: 35, goal: 60 },
  ]}
  formatValue={(r) => `${r.value} / ${r.goal}`}
/>;

Rings are listed outermost first and coloured azure, sky, success and warning in turn unless you pass color. Put a figure or a date in the middle with center.

When to use

  • Daily goals with a clear target: activity, habits, savings, reading.
  • Dashboards where two to four related goals are read together at a glance.

When not to use

  • Values without a goal. Use a bar or line chart.
  • More than four series. Inner rings get too small to read.

Notes

  • A ring past its goal keeps going round, up to two laps, and the second lap casts a shadow on the first.
  • Tap a legend row to bring its ring forward; the others step back.
  • With reduced motion the rings appear already filled.

Props

ActivityRingsProps

PropTypeDefaultDescription
ringsrequiredreadonly ActivityRing[]—One to four rings, outermost first.
accessibilityLabelrequiredstring—A summary of what the rings show, e.g. "Today's activity".
sizenumber180Diameter. Defaults to 180.
thicknessnumber18Width of each ring. Defaults to 18.
gapnumber4Space between rings. Defaults to 4.
centerReactNode—Shown in the middle.
legendbooleantrueRows beside the rings; tap one to bring its ring forward. Defaults to true.
formatValue(ring: ActivityRing) => string(r) => `${Math.round(r.value)} / ${Math.round(r.goal)}`Formats a ring's value and goal, e.g. "420 / 600 kcal".
hapticsbooleantrueA tick when a ring is brought forward. Defaults to true.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
Ring paths are built once per size; the wind-up trims them with one shared value per ring, drawn by a single Skia canvas.
Measured

Pixel 9 emulator, API 35, release build · interaction median 0.90× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 153 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
Rings appear filled to their values and selection fades without delay.
Screen readers
The rings read as an image listing every ring's value, goal and share; legend rows are buttons with a selected state.
Touch target
Legend rows are at least 44 pt tall and span the legend's width.

Source files

components/kinetik/activity-rings.tsx is in the Code tab of the preview above.