SwipeUI

Progress

Determinate linear, circular and segmented progress driven on UI.

npx @swipeui/cli add progress
Variant
Preset
Material
Scheme
Feel
Real free component with a browser animation bridge. Native motion, haptics and materials need a device.

When to use it

  • Uploads, downloads and installs where you know how far along it is.
  • Profile completion or course progress.
  • Circular progress for goals like a daily step target.
  • Segmented bars for multi-part tasks.

When not to use it

  • Unknown durations. Use Spinner.
  • Allowances with limits and categories. Use Usage meter.
  • Steps in a flow with names. Use Stepper.

Installation

Run this from your app's root. If SwipeUI isn't set up yet, run npx @swipeui/cli init first; it sets up Uniwind, the theme tokens and the cn helper.

npx @swipeui/cli add progress
  • Adds components/swipeui/ui/progress.tsx and 4 shared helpers.
  • Installs react-native-reanimated, react-native-svg, uniwind, clsx, tailwind-merge, react-native-worklets, class-variance-authority. In Expo apps it uses npx expo install so versions match your SDK.

Usage

app/upload.tsx
import { Progress } from '@/components/swipeui/ui/progress';

<Progress value={0.6} label="Upload" showValue />;

Examples

Use the variant and appearance controls in the live specimen to compare the documented states. The application owns validation, operation results and persistence.

API reference

ProgressProps

PropTypeDefaultDescription
completionEffect?booleantrue

Rainbow finish on segmented progress.

completionPulse?booleantrue

Pulse the completed colours.

completionLoop?booleanfalse

Repeat the finish wave while complete.

active?booleantrue

Caller viewability override for ambient motion.

valuenumber—

Fraction complete, clamped to 0–1.

variant?"circular" | "linear" | "segmented"'linear'

Shape.

segments?number5

Segment count, integer 1–40.

size?number64

Circle diameter in points.

label?string'Progress'

Spoken purpose.

showValue?booleanfalse

Show numeric completion beside the track.

motion?MotionOverride—

Shared number motion.

className?string—

Root classes.

style?StyleProp<ViewStyle>—

Native layout escape hatch.

testID?string—

Root ID.

Native view/input props not listed here pass through where the exported TypeScript type allows them.

Composition and behavior

  • variant is linear, circular or segmented; segments sets the count.
  • size sets the circle diameter (64 points).
  • label and showValue control what's read and shown.

Feedback lineup settings

PropDoes / default
completionEffectRainbow finish on segmented progress. @default true
completionPulsePulse the completed colours. @default true
completionLoopRepeat the finish wave while complete. @default false
activeCaller viewability override for ambient motion. @default true
valueFraction complete, clamped to 0–1.
variantShape. @default 'linear'
segmentsSegment count, integer 1–40. @default 5
sizeCircle diameter in points. @default 64
labelSpoken purpose. @default 'Progress'
showValueShow numeric completion beside the track. @default false
motionShared number motion.
classNameRoot classes.
styleNative layout escape hatch.
testIDRoot ID.

Behaviour

Segmented completion plays one travelling rainbow then restores the primary fill. completionEffect, completionPulse and completionLoop are independent; active pauses ambient work. Reduce Motion retains a static completed track.

Segmented completion now defaults to a single rainbow cycle, then restores the normal primary fill. completionLoop defaults to false; opt in to retain repeating waves. completionEffect and completionPulse stay independent. Background/offscreen work pauses, and Reduce Motion keeps the completed primary track.

Behavior and gestures

  • Static; it moves smoothly to each new value you pass.
  • showValue adds the percentage beside the track.

Accessibility

  • Announced as a progress bar with its label and percentage, for example "Upload, 40%".
  • Give it a meaningful label; the default is "Progress".
  • The ring and segments are drawn decoratively; the value carries the meaning.

Motion

  • Uses the number motion role, so it follows your app's feel. Pass motion to tune this one instance.
  • The fill eases between values with the number role.
  • Reduce Motion jumps to the new value.

Performance

  • Animates on the UI thread; update as often as needed.

Notes for AI

  • value is a fraction from 0 to 1.

Compatibility

Runs onSupported
Expo SDK 57Yes
Expo SDK 58Yes
React Native CLI (with Expo modules)Yes
Expo GoYes
iOSYes
AndroidYes

This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.

Related items