Skip to content

Stepper API

import { UNSTABLE_Stepper, UNSTABLE_StepperItem } from '@cimpress-ui/react';

A Stepper consists of multiple StepperItem components, each representing a single step in the process. Place each StepperItem as a child of the Stepper.

By default, Stepper will automatically set the status of each StepperItem based on its index: steps before the current step (currentStep) are marked as complete, the current step as in-progress, and any remaining steps as incomplete. You can override this by providing a status prop directly to a step (e.g., complete, warning, or error).

To make the stepper interactive, provide an onChange handler to the Stepper. Make sure to update the currentStep prop when the onChange handler is called. Users can only select steps that precede the current step, or any step with an explicit status prop.

Displays a series of steps in a process.

Ref<HTMLDivElement>

The ref type for this component.

UNSTABLE_StepperProps
ReactNode

The steps to display in the stepper.

number

The index of the active step.

(step: number) => void

The callback to call when the current step changes.

'vertical' | 'horizontal'

The orientation of the stepper.

Defaults to 'horizontal' .
string

The element's unique identifier. See MDN.

boolean

Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.

string

Sets the CSS className for the element. Only use as a last resort. Use style props instead.

See styling guide.

CSSProperties

Sets the CSS style for the element. Only use as a last resort. Use style props instead.

See styling guide.

StyleProps
Responsive<Spacing | "auto">

The amount of margin applied to all edges of this component.

Responsive<Spacing | "auto">

The amount of margin applied to the left and right edges of this component. Takes priority over margin.

Responsive<Spacing | "auto">

The amount of margin applied to the top and bottom edges of this component. Takes priority over margin.

Responsive<Spacing | "auto">

The amount of margin applied to the top edge of this component. Takes priority over marginY and margin.

Responsive<Spacing | "auto">

The amount of margin applied to the right edge of this component. Takes priority over marginX and margin.

Responsive<Spacing | "auto">

The amount of margin applied to the bottom edge of this component. Takes priority over marginY and margin.

Responsive<Spacing | "auto">

The amount of margin applied to the left edge of this component. Takes priority over marginX and margin.

Represents a single step in a stepper component.

UNSTABLE_StepperItemProps
StringLikeChildren

The title of the step.

ReactNode

The description of the step. Optionally, you can pass a React node to render rich text.

StepperStatus

The status of the step.

string

The element's unique identifier. See MDN.

boolean

Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.

string

Sets the CSS className for the element. Only use as a last resort. Use style props instead.

See styling guide.

CSSProperties

Sets the CSS style for the element. Only use as a last resort. Use style props instead.

See styling guide.