Stepper

A multi-step progress indicator for guiding users through sequential workflows.

Import

import { Stepper } from 'heroui-native-pro';

Anatomy

<Stepper>
  <Stepper.Step>
    <Stepper.Rail>
      <Stepper.Indicator>
        <Stepper.IndicatorCheck />
        <Stepper.IndicatorNumber />
      </Stepper.Indicator>
      <Stepper.Separator>
        <Stepper.SeparatorTrack />
        <Stepper.SeparatorFill />
      </Stepper.Separator>
    </Stepper.Rail>
    <Stepper.Content>
      <Stepper.Title>...</Stepper.Title>
      <Stepper.Description>...</Stepper.Description>
    </Stepper.Content>
  </Stepper.Step>
</Stepper>
  • Stepper: Root container that manages step state, orientation, and animation context. Controls which step is active via controlled or uncontrolled mode.
  • Stepper.Step: Pressable container for an individual step. Automatically receives its index and status (inactive, active, complete).
  • Stepper.Rail: Relative wrapper for the indicator and separator. Renders Indicator and Separator by default when children are omitted; Separator is omitted on step index 0.
  • Stepper.Indicator: Visual circle for each step. Renders IndicatorCheck and IndicatorNumber by default when children are omitted.
  • Stepper.IndicatorCheck: Animated check icon that draws in when the step is complete.
  • Stepper.IndicatorNumber: 1-based step number label displayed inside the indicator.
  • Stepper.Separator: Connector line between steps. Renders SeparatorTrack and SeparatorFill by default when children are omitted.
  • Stepper.SeparatorTrack: Static background track behind the separator fill.
  • Stepper.SeparatorFill: Animated accent fill layered on the track, driven by root progress.
  • Stepper.Content: Container for step title, description, and any additional content.
  • Stepper.Title: Text label for the step title.
  • Stepper.Description: Text label for the step description.

Usage

Basic Usage

The Stepper component uses compound parts to create a step-by-step indicator. Steps are pressable by default.

<Stepper>
  <Stepper.Step>
    <Stepper.Rail />
    <Stepper.Content>
      <Stepper.Title>Account</Stepper.Title>
      <Stepper.Description>Create your account</Stepper.Description>
    </Stepper.Content>
  </Stepper.Step>
  <Stepper.Step>
    <Stepper.Rail />
    <Stepper.Content>
      <Stepper.Title>Profile</Stepper.Title>
      <Stepper.Description>Set up your profile</Stepper.Description>
    </Stepper.Content>
  </Stepper.Step>
</Stepper>

Horizontal Orientation

Display steps in a horizontal layout.

<Stepper orientation="horizontal">
  <Stepper.Step>
    <Stepper.Rail />
    <Stepper.Content>
      <Stepper.Title>Cart</Stepper.Title>
    </Stepper.Content>
  </Stepper.Step>
  <Stepper.Step>
    <Stepper.Rail />
    <Stepper.Content>
      <Stepper.Title>Shipping</Stepper.Title>
    </Stepper.Content>
  </Stepper.Step>
  <Stepper.Step>
    <Stepper.Rail />
    <Stepper.Content>
      <Stepper.Title>Payment</Stepper.Title>
    </Stepper.Content>
  </Stepper.Step>
</Stepper>

Controlled Step

Control the active step externally and respond to step changes.

const [currentStep, setCurrentStep] = useState(0);

<Stepper currentStep={currentStep} onStepChange={setCurrentStep}>
  <Stepper.Step>
    <Stepper.Rail />
    <Stepper.Content>
      <Stepper.Title>...</Stepper.Title>
    </Stepper.Content>
  </Stepper.Step>
  <Stepper.Step>
    <Stepper.Rail />
    <Stepper.Content>
      <Stepper.Title>...</Stepper.Title>
    </Stepper.Content>
  </Stepper.Step>
</Stepper>

Custom Indicator

Replace the default indicator content with custom icons per step.

<Stepper.Step>
  <Stepper.Rail>
    <Stepper.Indicator>
      <CustomIcon />
      <Stepper.IndicatorNumber />
    </Stepper.Indicator>
    <Stepper.Separator />
  </Stepper.Rail>
  <Stepper.Content>
    <Stepper.Title>...</Stepper.Title>
  </Stepper.Content>
</Stepper.Step>

Custom Separator Colors

Override separator and indicator colors using className on each compound part.

<Stepper.Step>
  <Stepper.Rail>
    <Stepper.Indicator className="border-success data-[status=complete]:bg-success">
      ...
    </Stepper.Indicator>
    <Stepper.Separator className="bg-success data-[status=inactive]:bg-border">
      <Stepper.SeparatorTrack className="bg-border" />
      <Stepper.SeparatorFill className="bg-success" />
    </Stepper.Separator>
  </Stepper.Rail>
  <Stepper.Content>
    <Stepper.Title>...</Stepper.Title>
  </Stepper.Content>
</Stepper.Step>

Disabled Animation

Disable all stepper animations using the root animation prop.

<Stepper animation="disable-all" currentStep={1}>
  <Stepper.Step>
    <Stepper.Rail />
    <Stepper.Content>
      <Stepper.Title>...</Stepper.Title>
    </Stepper.Content>
  </Stepper.Step>
</Stepper>

Example

import { Button } from 'heroui-native';
import { Stepper } from 'heroui-native-pro';
import { useState } from 'react';
import { Text, View } from 'react-native';

const STEPS = [
  { description: 'Create your account', title: 'Account' },
  { description: 'Set up your profile', title: 'Profile' },
  { description: 'Configure preferences', title: 'Settings' },
  { description: 'Review and confirm', title: 'Review' },
];

export default function StepperExample() {
  const [currentStep, setCurrentStep] = useState(0);

  return (
    <View className="flex-1 justify-center px-5">
      <Stepper
        orientation="vertical"
        currentStep={currentStep}
        onStepChange={setCurrentStep}
      >
        {STEPS.map((s) => (
          <Stepper.Step key={s.title}>
            <Stepper.Rail />
            <Stepper.Content>
              <Stepper.Title>{s.title}</Stepper.Title>
              <Stepper.Description>{s.description}</Stepper.Description>
            </Stepper.Content>
          </Stepper.Step>
        ))}
      </Stepper>
      <View className="mt-6 flex-row items-center justify-center gap-2">
        <Button
          size="sm"
          variant="outline"
          isDisabled={currentStep <= 0}
          onPress={() => setCurrentStep((n) => Math.max(0, n - 1))}
        >
          Prev
        </Button>
        <Text className="w-10 text-center text-muted text-xs">
          {`${currentStep + 1} / ${STEPS.length}`}
        </Text>
        <Button
          size="sm"
          variant="outline"
          isDisabled={currentStep >= STEPS.length - 1}
          onPress={() => setCurrentStep((n) => Math.min(STEPS.length - 1, n + 1))}
        >
          Next
        </Button>
      </View>
    </View>
  );
}

API Reference

Stepper

proptypedefaultdescription
childrenReact.ReactNode-Step elements to render inside the stepper
currentStepnumber-Controlled active step index
defaultStepnumber0Initial step index in uncontrolled mode
orientation'horizontal' | 'vertical''vertical'Main axis of the step sequence
animationStepperRootAnimation-Root animation configuration
classNamestring-Additional CSS classes for the root container
onStepChange(step: number) => void-Callback when the active step index changes
...ViewPropsViewProps-All standard React Native View props are supported

Data Attributes

attributevaluesdescription
data-orientation"horizontal" | "vertical"Current layout orientation

StepperRootAnimation

Animation configuration for the stepper root. Can be:

  • false or "disabled": Disable only root progress animation
  • "disable-all": Disable all animations including children
  • true or undefined: Use default animations
  • object: Custom animation configuration
proptypedefaultdescription
state'disabled' | 'disable-all' | boolean-Disable animations while customizing properties
progress.timingConfigWithTimingConfig{ duration: 200, easing: Easing.out(Easing.ease) }Timing configuration for step progress animation

Stepper.Step

proptypedefaultdescription
childrenReact.ReactNode-Step content (Rail, Content, etc.)
classNamestring-Additional CSS classes for the step container
...PressablePropsPressableProps-All standard React Native Pressable props are supported

Data Attributes

attributevaluesdescription
data-orientation"horizontal" | "vertical"Current layout orientation

Stepper.Rail

proptypedefaultdescription
childrenReact.ReactNode-Custom rail content; when omitted, renders Indicator and Separator (except on step 0)
classNamestring-Additional CSS classes for the rail container
...ViewPropsViewProps-All standard React Native View props are supported

Stepper.Indicator

proptypedefaultdescription
childrenReact.ReactNode-Custom indicator content; when omitted, renders IndicatorCheck and IndicatorNumber
classNamestring-Additional CSS classes for the indicator container
...ViewPropsViewProps-All standard React Native View props are supported

Data Attributes

attributevaluesdescription
data-status"inactive" | "active" | "complete"Step status relative to the active step

Stepper.IndicatorCheck

proptypedefaultdescription
sizenumber16Icon size in logical pixels
strokeWidthnumber-Stroke width for the check path
colorstringaccent-foregroundStroke color of the check icon
enterDurationnumber200Duration (ms) when check draws in
exitDurationnumber0Duration (ms) when check draws out
classNamestring-Additional CSS classes for the wrapper
...ViewPropsViewProps-All standard React Native View props are supported

Stepper.IndicatorNumber

proptypedefaultdescription
childrenReact.ReactNode | ((index: number) => React.ReactNode)-Custom label; static node or function receiving zero-based index
classNamestring-Additional CSS classes for the label text
...TextPropsTextProps-All standard React Native Text props are supported

Data Attributes

attributevaluesdescription
data-status"inactive" | "active" | "complete"Step status relative to the active step

Stepper.Separator

proptypedefaultdescription
childrenReact.ReactNode-Custom separator content; when omitted, renders SeparatorTrack and SeparatorFill
forcebooleanfalseRender the separator on the last step
progressnumber-Explicit fill amount (0–1); when omitted, derived from currentStep
classNamestring-Additional CSS classes for the separator container
...ViewPropsViewProps-All standard React Native View props are supported

Data Attributes

attributevaluesdescription
data-orientation"horizontal" | "vertical"Current layout orientation
data-status"inactive" | "active" | "complete"Step status relative to the active step

Stepper.SeparatorTrack

proptypedefaultdescription
classNamestring-Additional CSS classes for the track view
...ViewPropsViewProps-All standard React Native View props are supported

Stepper.SeparatorFill

proptypedefaultdescription
animationfalse | 'disabled'-Disable the fill scale animation for this separator
isAnimatedStyleActivebooleantrueWhen false, animated scale styles are not applied
classNamestring-Additional CSS classes for the fill view
...ViewPropsViewProps-All standard React Native View props are supported

Stepper.Content

proptypedefaultdescription
childrenReact.ReactNode-Content to render (title, description, etc.)
classNamestring-Additional CSS classes for the content container
...ViewPropsViewProps-All standard React Native View props are supported

Data Attributes

attributevaluesdescription
data-orientation"horizontal" | "vertical"Current layout orientation

Stepper.Title

proptypedefaultdescription
childrenReact.ReactNode-Title text for the step
classNamestring-Additional CSS classes for the title text
...TextPropsTextProps-All standard React Native Text props are supported

Data Attributes

attributevaluesdescription
data-orientation"horizontal" | "vertical"Current layout orientation
data-status"inactive" | "active" | "complete"Step status relative to the active step

Stepper.Description

proptypedefaultdescription
childrenReact.ReactNode-Description text for the step
classNamestring-Additional CSS classes for the description text
...TextPropsTextProps-All standard React Native Text props are supported

Data Attributes

attributevaluesdescription
data-orientation"horizontal" | "vertical"Current layout orientation
data-status"inactive" | "active" | "complete"Step status relative to the active step

Hooks

useStepper

Hook to access the stepper root context. Must be used within a Stepper component.

import { useStepper } from 'heroui-native-pro';

const { currentStep, onStepChange, orientation } = useStepper();

Returns

propertytypedescription
currentStepnumberCurrently active step index
onStepChange(step: number) => voidCallback to update the active step
orientation'horizontal' | 'vertical'Current layout orientation
measurementsRecord<number, StepMeasurements>Per-step layout measurements
setStepMeasurement(index: number, partial: Partial<StepMeasurements>) => voidUpdate layout measurements for a step

useStepperStep

Hook to access the per-step context. Must be used within a Stepper.Step component.

import { useStepperStep } from 'heroui-native-pro';

const { index, isLast, status } = useStepperStep();

Returns

propertytypedescription
indexnumberZero-based index of the step
isLastbooleanWhether this is the last step
status'inactive' | 'active' | 'complete'Current status relative to active step

useStepperAnimation

Hook to access the stepper animation context. Must be used within a Stepper component.

import { useStepperAnimation } from 'heroui-native-pro';

const { progress } = useStepperAnimation();

Returns

propertytypedescription
progressSharedValue<number>Animated progress aligned with the active step index

On this page