Kinetik UI

Steps Bar

.md

Steps towards a goal: the bar fills from olive to green as a small walker strides along its front.

v1.0.0Live on webreact-native-reanimatedreact-native-svgreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add steps-bar

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/steps-bar.json

Install manually

  1. Install dependencies
    npx expo install react-native-reanimated react-native-svg react-native-worklets
  2. Copy the source files
    • components/kinetik/steps-bar.tsx
    View source files

Usage

import { StepsBar } from '@/components/kinetik/steps-bar';

<StepsBar steps={6317} distance="4.2 KM" climb="9 FLOORS" />;

When to use

  • Daily step or distance goals.
  • Any single count towards a target with a bit of character.

When not to use

  • Several goals at once. Use Activity Rings.
  • Counts with no target.

Notes

  • The walker stops once the goal is reached.
  • The scale marks 0, half and the goal.

Props

StepsBarProps

PropTypeDefaultDescription
stepsrequirednumber—
goalnumber10000Daily goal. Defaults to 10000.
distancestring—Distance line, e.g. "4.2 KM".
climbstring—Climb line, e.g. "9 FLOORS".
labelstring'STEPS'Label over the count. Defaults to "STEPS".
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
The bar moves on a UI-thread spring on change. The walker is one view on a UI-thread loop until the goal, so it animates at rest.
Measured

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

Accessibility

Reduced motion
The bar jumps to its place, the walker holds still and the count does not climb.
Screen readers
One progress bar ("6,317 STEPS, 4.2 KM, 9 FLOORS").
Touch target
Not interactive.

Source files

components/kinetik/steps-bar.tsx is in the Code tab of the preview above.