Kinetik UI

Ring Spinner

.md

A spinner whose arc stretches as it turns, fills to a known amount, and closes into a check or a cross.

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

Installation

Kinetik CLI
npx kinetik-ui add ring-spinner

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/ring-spinner.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/ring-spinner.tsx
    View source files

Usage

import { RingSpinner } from '@/components/kinetik/ring-spinner';

<RingSpinner accessibilityLabel="Syncing" status={done ? 'success' : 'loading'} />

// A known amount of work
<RingSpinner accessibilityLabel="Upload" progress={sent / total} />

When to use

  • Waits inside a card, a row or a button, where a spinner should also show how it ended.
  • Uploads and downloads with a known size, with progress.

When not to use

  • Loading whole screens of content. Use Skeleton Sweep.
  • Very short waits, under about half a second. Nothing at all feels faster.

Notes

  • The arc grows and shrinks as it turns, and its tail carries over from one cycle to the next, so the motion never jumps.
  • Set status to success or error and the ring closes, changes colour and draws a check or a cross. The clock stops then, so a settled spinner costs nothing.
  • With reduced motion it shows a still quarter arc while loading, and results appear without drawing in.

Props

RingSpinnerProps

PropTypeDefaultDescription
statusRingSpinnerStatus'loading'`success` closes the ring and draws a check; `error` draws a cross. Defaults to `loading`.
progressnumber—0 to 1 for a known amount of work; leave unset to spin.
sizenumber40Diameter. Defaults to 40.
thicknessnumber—Stroke width. Defaults to size / 11.
colorstring—Arc colour while loading. Defaults to the theme azure.
accessibilityLabelstring'Loading'Names what is loading. Defaults to 'Loading'.
testIDstring—
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
One small Skia canvas driven by one clock on the UI thread while it spins. The clock stops once it shows progress, success or an error.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.05× the system Settings app on the same emulator (indicative only) · keeps drawing at rest · 153 MB app memory. The demo upload ring keeps counting, so it draws at rest; a settled spinner stops its clock.

Real-device measurement pending.

Accessibility

Reduced motion
A still quarter arc while loading; progress, the check and the cross appear without drawing in.
Screen readers
A progress indicator named by accessibilityLabel. It reports a percentage when given progress, reads Done or Failed when it settles, and announces the result.
Touch target
Not interactive.

Source files

components/kinetik/ring-spinner.tsx is in the Code tab of the preview above.