Stepper API
Import
Section titled “Import”import { UNSTABLE_Stepper, UNSTABLE_StepperItem } from '@cimpress-ui/react';Usage notes
Section titled “Usage notes”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.
API reference
Section titled “API reference”Stepper
Section titled “Stepper”Displays a series of steps in a process.
- Ref<HTMLDivElement>
-
The
reftype for this component.
UNSTABLE_StepperProps
- ReactNode
children *
Section titled “ children * ” -
The steps to display in the stepper.
- number
currentStep
Section titled “ currentStep ” -
The index of the active step.
- (step: number) => void
onChange
Section titled “ onChange ” -
The callback to call when the current step changes.
- 'vertical' | 'horizontal'
orientation
Section titled “ orientation ” - Defaults to 'horizontal' .
The orientation of the stepper.
- string
-
The element's unique identifier. See MDN.
- boolean
data-cim-style-root
Section titled “ data-cim-style-root ” -
Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.
- string
UNSAFE_className
Section titled “ UNSAFE_className ” -
Sets the CSS className for the element. Only use as a last resort. Use style props instead.
See styling guide.
- CSSProperties
UNSAFE_style
Section titled “ UNSAFE_style ” -
Sets the CSS style for the element. Only use as a last resort. Use style props instead.
See styling guide.
StyleProps
- Responsive<Spacing | "auto">
margin
Section titled “ margin ” -
The amount of margin applied to all edges of this component.
- Responsive<Spacing | "auto">
marginX
Section titled “ marginX ” -
The amount of margin applied to the left and right edges of this component. Takes priority over
margin. - Responsive<Spacing | "auto">
marginY
Section titled “ marginY ” -
The amount of margin applied to the top and bottom edges of this component. Takes priority over
margin. - Responsive<Spacing | "auto">
marginTop
Section titled “ marginTop ” -
The amount of margin applied to the top edge of this component. Takes priority over
marginYandmargin. - Responsive<Spacing | "auto">
marginRight
Section titled “ marginRight ” -
The amount of margin applied to the right edge of this component. Takes priority over
marginXandmargin. - Responsive<Spacing | "auto">
marginBottom
Section titled “ marginBottom ” -
The amount of margin applied to the bottom edge of this component. Takes priority over
marginYandmargin. - Responsive<Spacing | "auto">
marginLeft
Section titled “ marginLeft ” -
The amount of margin applied to the left edge of this component. Takes priority over
marginXandmargin.
StepperItem
Section titled “StepperItem”Represents a single step in a stepper component.
UNSTABLE_StepperItemProps
- StringLikeChildren
children *
Section titled “ children * ” -
The title of the step.
- ReactNode
description
Section titled “ description ” -
The description of the step. Optionally, you can pass a React node to render rich text.
- StepperStatus
status
Section titled “ status ” -
The status of the step.
- string
-
The element's unique identifier. See MDN.
- boolean
data-cim-style-root
Section titled “ data-cim-style-root ” -
Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.
- string
UNSAFE_className
Section titled “ UNSAFE_className ” -
Sets the CSS className for the element. Only use as a last resort. Use style props instead.
See styling guide.
- CSSProperties
UNSAFE_style
Section titled “ UNSAFE_style ” -
Sets the CSS style for the element. Only use as a last resort. Use style props instead.
See styling guide.