React Native · Components
Stepper
Progress indicator for multi-step flows (checkout, sign-up, wizard).
Live example
The preview runs in the browser with the web component; the native component takes the same props and looks the same on iOS and Android.
Preview
Code
Events
- Events appear here when you interact with the preview.
Server action: jumps to the step of the field that returned an error by itself
Preview
Code
Events
- Events appear here when you interact with the preview.
Vertical: the content of the selected step opens below it
Bar and dot styles, name below
Import
Stepper
componentProgress indicator for multi-step flows (checkout, sign-up, wizard). On phones (below 640 px) horizontal steps switch to a compact view by default: "Step 2 / 5", the step's name and a segmented bar; it always fits the screen. States (error, warning, loading, skipped) and navigation rules are the same as web.
Examples
Wizard
componentA form that progresses step by step (same API as the web Wizard): step indicator, the step's fields, Back / Next / Complete buttons and per-step validation in one component. All steps are a single Form; entries are not lost when going back, and all values are submitted together on the last step.
- Pressing Next validates only that step's fields against the schema; errors show under the fields and the first invalid field is focused. Then the step's
validatefunction (may be async) runs, if any. - When a server error arrives (
state.errorsorsetErrors) it goes to the step of the invalid field. Invalid steps are red in the indicator, skipped ones dashed. - The Android back button returns to the previous step; on step change the screen reader reads the new step's title; the transition slides by direction (none when reduce motion is on).
Examples
resolveStepStatus
functionState of a step from its order and the manually given state (same as web).
useWizard
functionState and navigation functions of the nearest Wizard; for writing your own buttons or showing a summary inside a step.
Examples
StepStatus
typeStep state; computed from the order if omitted.
StepItem
interfaceA step inside Stepper.
| Name | Type | Description |
|---|---|---|
label | ReactNode | Its name. |
description? | ReactNode | Description under the name. |
icon? | IconProp | Icon instead of the number. |
status? | StepStatus | Manually given state (error, warning, loading, skipped). |
optional? | boolean | ReactNode | Optional step: shows "İsteğe bağlı" (optional) or the given text. |
disabled? | boolean | Cannot be selected. |
content? | ReactNode | Content shown under the step while selected, in the vertical layout. |
StepperVariant
typeAppearance: numbered circle, dot or segmented bar.
StepperMobile
typeAppearance of horizontal steps on narrow screens (below 640 px).
StepperProps
interfaceStepper props.
| Name | Type | Default | Description |
|---|---|---|---|
items | readonly StepItem[] | Steps. | |
value? | number | Index of the current step (controlled, starting at 0). | |
defaultValue? | number | 0 | Initial step. |
onValueChange? | (index: number) => void | When the step changes. | |
navigation? | StepperNavigation | "completed"` with `onValueChange`, otherwise `"none" | Navigation by tapping. |
orientation? | "horizontal" | "vertical" | "horizontal" | Orientation. |
variant? | StepperVariant | (string & {}) | "circle" | Appearance. |
effect? | EffectProp | Effect of the step indicators ("pulse", "glow", "bounce"…); stays on for the current step. Defaults to appearance.defaults.stepper.effect. See BuiltinEffect. | |
labelPlacement? | "end" | "bottom" | "end" | In horizontal layout the name sits beside or below the indicator; always below on narrow screens with mobile="full". |
mobile? | StepperMobile | "compact" | Narrow screen appearance. |
size? | Size | "md" | Size. |
label? | string | {@link UIProvider} `steps` text | Screen reader name. |
style? | StyleProp<ViewStyle> | Container style. |
Return value of a step's validate function (same as web).
undefined/true: valid, proceeds.false: does not proceed.- Text: shown in an error box above the step.
{ fieldName: "message" }: messages are shown under the fields with matching names; names not in the step fall into the error box.
WizardContextValue
interfaceValue received by useWizard and function-form step content.
| Name | Type | Description |
|---|---|---|
step | number | Index of the current step (from 0). |
count | number | Number of steps. |
isFirst | boolean | On the first step? |
isLast | boolean | On the last step? |
busy | boolean | Is a validation or submission running? |
next | () => Promise<boolean> | Validates the step and moves to the next; true if it moved. Completes on the last step. |
back | () => void | Returns to the previous step (no validation). |
goTo | (index: number) => Promise<boolean> | Goes to a step; when moving forward (in a linear flow) the steps in between are validated. |
skip | () => void | Skips an optional step without validation; its fields are not submitted. |
data | Record<string, unknown> | null | Form values at the moment the step was entered (for a summary step). On native this is a values object instead of FormData. |
getData | () => Record<string, unknown> | Current values of the form. |
WizardStep
interfaceA step inside Wizard.
| Name | Type | Description |
|---|---|---|
label | ReactNode | Name in the step indicator. |
description? | ReactNode | Short description under the name. |
icon? | IconProp | Icon instead of the number. |
title? | ReactNode | Title above the content. If omitted, screen readers read only label. |
content | ReactNode | ((wizard: WizardContextValue) => ReactNode) | The step's fields; a function receives the wizard's state. |
validate? | (values: Record<string, unknown>, wizard: WizardContextValue) => WizardValidateResult | Promise<WizardValidateResult> | Extra validation run after the schema rules pass (can be a Promise; the Next button shows loading meanwhile). See WizardValidateResult. |
optional? | boolean | Optional: a "Skip" button appears; the skipped step's fields are neither submitted nor validated. |
disabled? | boolean | The step is skipped and cannot be navigated to. |
WizardLabels
interfaceTexts of the Wizard buttons.
| Name | Type | Default | Description |
|---|---|---|---|
back? | ReactNode | "Geri" | |
next? | ReactNode | "İleri" | |
finish? | ReactNode | "Tamamla" | |
skip? | ReactNode | "Atla" |
WizardProps
interfaceWizard props (same names as web).
Extends: Omit<FormProps<Schema>, "children" | "onValidSubmit">
| Name | Type | Default | Description |
|---|---|---|---|
steps | readonly WizardStep[] | Steps. | |
step? | number | Current step in controlled use. | |
defaultStep? | number | 0 | Initial step. |
onStepChange? | (index: number) => void | When the step changes. | |
linear? | boolean | true | Linear flow: the next step cannot be reached before passing a step. |
onComplete? | (data: FormValues<Schema>, values: Record<string, unknown>) => unknown | On the last step, if all steps are valid, called with the schema output and the raw values. If it returns a Promise the Complete button shows loading until it settles. | |
variant? | StepperVariant | "circle" | Indicator style. |
effect? | EffectProp | Indicator effects. | |
labelPlacement? | "end" | "bottom" | "end" | Position of the name in the horizontal indicator. |
mobile? | StepperMobile | "compact" | Indicator appearance on narrow screens. |
size? | Size | "md" | Indicator size. |
labels? | WizardLabels | Button texts. | |
footer? | ReactNode | Extra content in the bottom bar, left of the buttons. | |
backButton? | boolean | true | The Android back button returns to the previous step. |