Homelogologo
Sponsor

Steps

Indicates progress through a multi-step process

Usage

Use Steps to build a multi-step flow (wizard) with a clickable list of steps and matching content panels.

import { Steps, Button, Text } from "@elemnts-ui/react"; <Steps count={3}> <Steps.List> {[0, 1, 2].map((index) => ( <Steps.Item key={index} index={index}> <Steps.Trigger> <Steps.Indicator>{index + 1}</Steps.Indicator> <Text>Step {index + 1}</Text> </Steps.Trigger> <Steps.Separator /> </Steps.Item> ))} </Steps.List> {[0, 1, 2].map((index) => ( <Steps.Content key={index} index={index}> <Text>Step {index + 1} Content</Text> </Steps.Content> ))} <Steps.CompletedContent> <Text>All steps completed!</Text> </Steps.CompletedContent> <Steps.PrevTrigger asChild> <Button variant="ghost">Prev</Button> </Steps.PrevTrigger> <Steps.NextTrigger asChild> <Button variant="ghost">Next</Button> </Steps.NextTrigger> </Steps>;

API Reference

Steps

The root component that manages the stepper state.

PropTypeDefault
asChildbooleanfalse
countnumber-
defaultStepnumber-
idsElementIds-
isStepSkippable(index: number) => boolean() => false
isStepValid(index: number) => boolean() => true
linearboolean-
onStepChange(details: StepChangeDetails) => void-
onStepCompleteVoidFunction-
onStepInvalid(details: StepInvalidDetails) => void-
orientation"horizontal" | "vertical""horizontal"
stepnumber-

StepsRootProvider

Provides stepper state created with useSteps.

PropTypeDefault
valueUseStepsReturnrequired
asChildbooleanfalse

StepsCompletedContent

Renders content after all steps are completed.

PropTypeDefault
asChildbooleanfalse

StepsContent

Renders the content associated with a step.

PropTypeDefault
indexnumberrequired
asChildbooleanfalse

StepsContext

Provides access to the stepper state via a render prop.

StepsIndicator

Renders a visual indicator for a step.

PropTypeDefault
asChildbooleanfalse

StepsItem

Represents an individual step in the list.

PropTypeDefault
indexnumberrequired
asChildbooleanfalse

StepsItemContext

Provides access to an individual step's state via a render prop.

StepsList

Contains the step items.

PropTypeDefault
asChildbooleanfalse

StepsNextTrigger

Renders a trigger that advances to the next step.

PropTypeDefault
asChildbooleanfalse

StepsPrevTrigger

Renders a trigger that returns to the previous step.

PropTypeDefault
asChildbooleanfalse

StepsProgress

Renders the overall completion progress.

PropTypeDefault
asChildbooleanfalse

StepsSeparator

Renders a divider between step items.

PropTypeDefault
asChildbooleanfalse

StepsTrigger

Renders the interactive control for a step.

PropTypeDefault
asChildbooleanfalse