Kinetik UI

Timer Frame

.md

A countdown drawn around the card's edge: an orange frame drains clockwise as a small comet circles.

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

Installation

Kinetik CLI
npx kinetik-ui add timer-frame

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/timer-frame.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/timer-frame.tsx
    View source files

Usage

import { TimerFrame } from '@/components/kinetik/timer-frame';

<TimerFrame total={300} start={217} label="BREW" />;

When to use

  • Cooking, brewing, workouts and focus sessions.
  • Live timers where the time left should read at a glance.

When not to use

  • Long timers: the frame barely moves over hours.
  • Exact timing. It runs on the JS clock and is only as precise as a second.

Notes

  • The timer owns its countdown. Remount it with a new key to restart.
  • Setting running to false holds it, and it picks up from the same time.
  • onDone fires once when the time runs out.

Props

TimerFrameProps

PropTypeDefaultDescription
totalrequirednumber—Full length of the timer in seconds.
startnumber—Seconds left when it starts. Defaults to `total`.
runningbooleantrueRun or hold. Defaults to true.
labelstring—Label in the pill, e.g. "BREW". Defaults to the length in minutes.
onDone() => void—Called once when the time runs out.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
The frame drains in one continuous UI-thread timing and the comet is one turning view, so it animates while running. The time re-renders once a second.
Measured

Huawei P20 Lite (ANE-LX1), Android 9, release build · 13 ms median frame, 17 ms p90 · keeps drawing at rest · 132 MB app memory

Accessibility

Reduced motion
The frame steps with the clock and the comet holds still.
Screen readers
One timer ("3:37 left", or "3:37 left, paused").
Touch target
Not interactive.

Source files

components/kinetik/timer-frame.tsx is in the Code tab of the preview above.