Kinetik UI

Compass Arc

.md

A compass bezel rises from the bottom edge: the dial turns under a red pointer the short way round.

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

Installation

Kinetik CLI
npx kinetik-ui add compass-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/compass-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/compass-arc.tsx
    View source files

Usage

import { CompassArc } from '@/components/kinetik/compass-arc';

<CompassArc heading={320} note="23 M" />;

When to use

  • Heading in hiking, sailing and flying apps.
  • A small dashboard readout fed by a sensor.

When not to use

  • Navigation people depend on. It shows what you pass it and does not read a sensor.

Notes

  • heading can be any number. The dial always takes the short way round.
  • Reading the phone's compass is up to you.

Props

CompassArcProps

PropTypeDefaultDescription
headingrequirednumber—Heading in degrees, 0 is north.
notestring—Small line over the heading, e.g. "12M".
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
The dial is a still canvas turned as a view on a UI-thread spring, so it does not redraw. Nothing animates at rest.
Measured

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

Accessibility

Reduced motion
The dial jumps to the heading.
Screen readers
One label ("Heading 320 degrees NW, 23 M").
Touch target
Not interactive.

Source files

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