Kinetik UI

Zone Arc

.md

A reading on a half dial of coloured zones: zones sweep in, a marker swings over and its zone lights up.

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

Installation

Kinetik CLI
npx kinetik-ui add zone-arc

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/zone-arc.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/zone-arc.tsx
    View source files

Usage

import { ZoneArc } from '@/components/kinetik/zone-arc';

<ZoneArc
  value={86}
  min={0}
  zones={[
    { to: 50, color: 'hsl(145, 76%, 44%)' },
    { to: 100, color: 'hsl(50, 90%, 50%)' },
    { to: 150, color: 'hsl(28, 90%, 50%)' },
    { to: 200, color: 'hsl(350, 72%, 44%)' },
  ]}
  unit="AQI"
  ago="4 min ago"
/>;

When to use

  • A reading with named ranges: air quality, noise, battery health.
  • When being in the right zone matters more than the exact figure.

When not to use

  • Colour alone cannot carry the meaning: pair it with a word if the zones have names.
  • Values with no zones. Use Gauge Meter.

Notes

  • Each zone runs from the previous to up to its own.
  • The zone holding the value is lit and the rest are dimmed.

Props

ZoneArcProps

PropTypeDefaultDescription
valuerequirednumber—
minrequirednumber—Where the arc starts.
zonesrequiredArcZone[]—The zones in order. The last one's `to` is the end of the arc.
unitstring—Unit after the value, e.g. "AQI".
agostring—When it was read, e.g. "4 min ago".
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
One Skia canvas. The sweep and marker run on the UI thread on arrival and on change. Nothing animates at rest.
Measured

Huawei P20 Lite (ANE-LX1), Android 9, release build · 12 ms median frame, 18 ms p90 · no frames drawn at rest · 126 MB app memory

Accessibility

Reduced motion
The dial appears whole, the marker jumps to its place and the number does not count.
Screen readers
One label ("86 AQI, zone 2 of 4, 4 min ago").
Touch target
Not interactive.

Source files

components/kinetik/zone-arc.tsx is in the Code tab of the preview above.