SwipeUI

Stepper

Flow position and completion states with optional named step navigation.

npx @swipeui/cli add stepper
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

  • Checkout, sign-up or setup flows with named steps, such as Cart, Shipping and Payment.
  • Showing which steps are done, current and upcoming.
  • Letting people jump back to an earlier step.

When not to use it

  • Paging through images. Use Page dots.
  • Plain progress without names. Use Progress.
  • Number entry with plus and minus. Use Number field.

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 stepper
  • Adds components/swipeui/ui/stepper.tsx and 8 shared helpers.
  • Installs react-native-reanimated, react-native-svg, uniwind, react-native-worklets, clsx, tailwind-merge, expo-haptics, class-variance-authority. In Expo apps it uses npx expo install so versions match your SDK.

Usage

app/checkout.tsx
import { Stepper } from '@/components/swipeui/ui/stepper';

<Stepper current={step} steps={steps} />;

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

StepperProps

PropTypeDefaultDescription
appearance?"elevated" | "transparent"'transparent'

Card or transparent surface.

showProgress?booleanfalse

Optional quantitative track.

connectors?booleantrue

Join stages with a rail, separated from the circles.

stepsreadonly StepperStep[]—

Flow steps in reading order.

current?number0

Current step index, zero based.

onStepPress?((index: number) => void)—

Enables step navigation; omit for read-only flow status.

orientation?"horizontal" | "vertical"'vertical'

Layout direction.

messages?{ current: string; completed: string; upcoming: string; }—

Spoken statuses, independent of colour.

motion?MotionOverride—

Shared selection and press feel.

haptics?booleantrue

Action haptics.

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

  • steps each have a label, optional caption/description, completion state and disabled flag.
  • current marks the active step; orientation is vertical or horizontal.
  • onStepPress makes steps tappable.

Feedback lineup settings

PropDoes / default
idStable step identifier.
labelVisible step name.
captionOptional short day or section label above the step name.
descriptionOptional explanation.
completedApplication-owned completion state.
disabledPrevent navigating to this step.
appearanceCard or transparent surface. @default 'transparent'
showProgressOptional quantitative track. @default false
connectorsJoin stages with a visual rail. @default true
stepsFlow steps in reading order.
currentCurrent step index, zero based. @default 0
onStepPressEnables step navigation; omit for read-only flow status.
messagesCaller wording for current, completed and upcoming status.
orientationLayout direction. @default 'vertical'
motionShared selection and press feel.
classNameRoot classes.
styleNative layout escape hatch.
testIDRoot ID.

Behaviour

A stepper names stages in a flow; a Progress bar measures an amount. The app controls current/completed/disabled steps and decides which navigation is permitted.

Action haptics can be disabled independently with haptics={false} (default true).

The first step starts selected. Current and completed circles contain a green check; future circles are empty. Rails occupy only the gaps between circles and turn green as the preceding stage completes. Rows have no highlight box. The vertical specimen explains the three trial milestones; the horizontal specimen keeps the Account, Details and Review flow.

Behavior and gestures

  • Shows completed, current and upcoming steps, vertically or horizontally.
  • With onStepPress, tap a step to go to it; disabled steps can't be tapped.
  • Without it, the stepper is read-only status.

Accessibility

  • Each step reads its name and status, such as "Shipping, current" or "Cart, completed".
  • Descriptions are read after the status.
  • The current step is marked selected.

Motion

  • Uses the select, press and number motion roles, so it follows your app's feel. Pass motion to tune this one instance.
  • Checks and connectors animate with the shared select role; optional progress uses number. Reduce Motion makes state changes instant.

Performance

  • Simple rows; cheap to re-render as the flow advances.

Notes for AI

  • current is zero-based; mark steps disabled when they can't be revisited.

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