Stepper
A progress indicator for sequential flows such as onboarding, checkout, and multi-step dialogs.
Stepper shows where someone is in a sequence. Each step derives its state from one active value, and the connector fills as that value advances.
Import
Section titled “Import”import { Stepper } from "@zentara-co/zenos-ui";Anatomy
Section titled “Anatomy”Stepper.Trigger is optional. Include it when a step can be selected, and omit it for a read-only progress indicator. Omit Stepper.Separator on the last step. Stepper.Description sits with the title when a step needs supporting copy.
<Stepper value={step} onValueChange={setStep}> <Stepper.Item step={1}> <Stepper.Trigger> <Stepper.Indicator /> <Stepper.Title>Account</Stepper.Title> </Stepper.Trigger> <Stepper.Separator /> </Stepper.Item></Stepper>Pass value and onValueChange when Back and Next buttons, or another control, own the flow. Use defaultValue when the stepper only reports progress. Steps are 1-based.
A step earlier than value is completed, the matching step is active, and a later step is inactive. The separator on a completed step fills toward the next one.
Orientation
Section titled “Orientation”orientation="horizontal" lays steps in a row with a flexible connector. orientation="vertical" stacks them, with the connector running down the indicator column. Vertical orientation leaves room for a description under each title.
horizontal
vertical
Descriptions
Section titled “Descriptions”Pair Stepper.Title and Stepper.Description in a vertical stack beside the indicator.
Density
Section titled “Density”density="comfortable" is the default for onboarding and page flows. density="compact" shrinks the indicator and type for dialogs and dense application UI. Density also inherits from DensityProvider.
comfortable
compact
Loading and disabled
Section titled “Loading and disabled”Set loading on the active Stepper.Item to replace its number with a spinner while that step validates or submits. Set disabled on a step the person cannot select yet. A disabled step stays out of the sequence until the flow enables it.
Variants
Section titled “Variants”variant="outline" is the default: upcoming steps stay quiet, the active step uses the selected surface, and a completed step fills with the primary brand color. variant="solid" fills every indicator with that same primary color.
outline
solid
In a dialog
Section titled “In a dialog”Compose Stepper inside Dialog. Keep the dialog’s own step state as the stepper value, and disable steps the person has not reached so they cannot skip ahead.
Variants
outlinesolid Stepper Stepper.Item Stepper.Trigger Stepper.Indicator Stepper.Title Stepper.Description Stepper.Separator
API
| Prop | Type | Default | Description |
|---|---|---|---|
value / defaultValue / onValueChange | number / number / (value: number) => void | — | The active step, controlled or uncontrolled. Steps are 1-based. |
orientation | horizontal | vertical | horizontal | Lays steps in a row, or stacks them with the connector in the indicator column. |
variant | outline | solid | outline | Outline keeps upcoming steps quiet, marks the active step as selected, and fills a completed step with the primary brand color. Solid fills every indicator with that color. |
density | comfortable | compact | comfortable | Scales the indicator and type. Inherits from DensityProvider when omitted. |
Item.step | number | — | The step this item represents. State is derived by comparing it with value. |
Item.disabled | boolean | false | Blocks selection and mutes the step. |
Item.loading | boolean | false | Replaces the indicator content with a spinner. Use it on the active step. |
className | string | — | Merged last on every part. |
native props | React.HTMLAttributes<HTMLDivElement> | — | Forwards native attributes, events, aria-*, data-*, className, style, and ref. |
Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props,
including className, style, aria-*, and data-*.
Accessibility
Section titled “Accessibility”The root is a group and exposes aria-orientation. Give it an aria-label when the surrounding heading does not name the sequence.
Stepper.Trigger is a button. The active trigger sets aria-current="step". A disabled item disables its trigger, so it stays in the tab order’s skipped set and cannot be activated from the pointer or the keyboard. The indicator’s check and spinner are decorative; the title carries the step name.
Stepper.Separator is hidden from assistive technology. Do not rely on the connector alone to communicate progress.