Kinetik UI

Progress Bar

.md

A bar that springs to each new amount with a sheen along the fill, a counting percentage and a green finish.

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

Installation

Kinetik CLI
npx kinetik-ui add progress-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/progress-bar.json

Install manually

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

Usage

import { ProgressBar } from '@/components/kinetik/progress-bar';

<ProgressBar label="Uploading 12 photos" value={sent / total} />;

// Unknown length:
<ProgressBar label="Preparing the export" value={null} />;

When to use

  • Work that takes more than a second or two and whose amount is known: uploads, downloads, installs, imports.
  • With value={null} for work whose length is unknown yet, switching to a value once it is.

When not to use

  • Short waits under a second. Show nothing, or a spinner on the button (Status Button).
  • Quotas or limits that are not work in progress. Use Usage Meter.

Notes

  • The fill springs to each new value and the percentage counts up; a sheen travels along the fill while work is under way and stops at rest.
  • At 100% the fill turns green and doneLabel replaces the number.
  • It is a progressbar with a 0–100 value for screen readers, busy until done; indeterminate bars have no value.
  • With reduced motion the fill jumps, the number changes at once and there is no sheen or sweep.

Props

ProgressBarProps

PropTypeDefaultDescription
valuerequirednumber | null—From 0 to 1, or null while the amount of work is unknown.
labelstring—What is in progress, e.g. "Uploading 3 photos". Shown above the bar.
showValuebooleantrueThe percentage on the right. Defaults to true.
size'sm' | 'md''md'Bar thickness. Defaults to "md".
doneLabelstring'Done'Replaces the percentage once the bar is full. Defaults to "Done".
testIDstring—
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
Plain views and four shared values. The sheen loops on the UI thread only while work is under way; a finished bar is idle.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.17× the system Settings app on the same emulator (indicative only) · keeps drawing at rest · 146 MB app memory. The demo advances the bar every 0.9 s, so the sheen was running at rest; a finished bar draws nothing.

Real-device measurement pending.

Accessibility

Reduced motion
The fill jumps to each value with no sheen; the indeterminate bar holds still.
Screen readers
A progress bar named by its label with a 0 to 100 value, marked busy until it is done.
Touch target
Not interactive.

Source files

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