Kinetik UI

Scan Progress

.md

An analysing state for media: a scan band lights pixel squares over the image while a ring fills a pill.

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

Installation

Kinetik CLI
npx kinetik-ui add scan-progress

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/scan-progress.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/scan-progress.tsx
    View source files

Usage

import { ScanProgress } from '@/components/kinetik/scan-progress';

<ScanProgress
  source={{ uri: video.thumbnail }}
  imageLabel="Your swing, frame 1"
  progress={job.progress}
  done={job.status === 'complete'}
  label={job.stepLabel}
/>;

Leave out progress when the work has no measurable progress: the ring creeps towards 90% and slows down, and closes when done turns true.

When to use

  • Processing a photo or video the person just gave you: AI analysis, enhancement, background removal, upload checks.
  • Waits of a few seconds to a minute, where seeing the image being worked on reassures.

When not to use

  • Instant results under a second: the effect would only flash.
  • Waits without an image: use a progress bar or Ring Spinner.

Notes

  • label changes cross-fade, so you can name each step as it happens.
  • The pixel field draws white squares over the image; pick a tint that suits your photos (it defaults to the theme success green).
  • With reduced motion the pixel field and spinner rotation are left out; the ring and labels still report progress.

Props

ScanProgressProps

PropTypeDefaultDescription
labelrequiredstring—What is happening, e.g. "Analyzing swing motion…". Changes cross-fade.
sourceImageSourcePropType—The image being analysed. Or pass `children` for any other media.
childrenReactNode—
heightnumber260Height of the media card. Defaults to 260.
progressnumber—0–1. Leave out for work of unknown length: the ring creeps on and never quite closes.
donebooleanfalseSwitches to the finished state: the pixels clear, the ring closes and the spinner becomes a check.
doneLabelstring'Analysis complete'Shown once done. Defaults to "Analysis complete".
tintstring—Colour of the wash over the image, the ring and the glow. Defaults to the theme success green.
imageLabelstring—Read by screen readers for the image.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
The pixel field is three Skia paths rebuilt 30 times a second by one worklet while scanning; it stops completely when done. The ring is one trimmed path.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.41× the system Settings app on the same emulator (indicative only) · keeps drawing at rest · 195 MB app memory. Animating while scanning: the pixel field redraws 30 times a second and the spinner turns; both stop when done. Most of each frame is the emulator GPU swap.

Real-device measurement pending.

Accessibility

Reduced motion
No pixel field or spinner rotation; the wash, the ring and the labels still show progress.
Screen readers
The pill is a progress bar named by the current step, with its percentage when known; changes are announced. Pass imageLabel to describe the image.
Touch target
Not interactive.

Source files

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