A multi-step wizard for guiding users through sequential tasks.
Import
import{Steps}from'@oztix/roadie-components/steps'
Examples
Default
A horizontal stepper with three steps. Click a step trigger to navigate.
<Stepscount={3}><Steps.List><Steps.Itemindex={0}><Steps.Trigger><Steps.Indicator>1</Steps.Indicator><Steps.TriggerText>Details</Steps.TriggerText></Steps.Trigger><Steps.Separator/></Steps.Item><Steps.Itemindex={1}><Steps.Trigger><Steps.Indicator>2</Steps.Indicator><Steps.TriggerText>Review</Steps.TriggerText></Steps.Trigger><Steps.Separator/></Steps.Item><Steps.Itemindex={2}><Steps.Trigger><Steps.Indicator>3</Steps.Indicator><Steps.TriggerText>Confirm</Steps.TriggerText></Steps.Trigger></Steps.Item></Steps.List><Steps.Contentindex={0}><p>Enter your details here.</p></Steps.Content><Steps.Contentindex={1}><p>Review your information.</p></Steps.Content><Steps.Contentindex={2}><p>Confirm and submit.</p></Steps.Content><Steps.CompletedContent><pclassName='text-subtle'>All steps completed!</p></Steps.CompletedContent></Steps>
Direction
Use the direction prop to switch between horizontal and vertical layouts.
<Stepscount={3}direction='vertical'><Steps.List><Steps.Itemindex={0}><Steps.Trigger><Steps.Indicator>1</Steps.Indicator><Steps.TriggerText>Account</Steps.TriggerText></Steps.Trigger><Steps.Separator/></Steps.Item><Steps.Itemindex={1}><Steps.Trigger><Steps.Indicator>2</Steps.Indicator><Steps.TriggerText>Profile</Steps.TriggerText></Steps.Trigger><Steps.Separator/></Steps.Item><Steps.Itemindex={2}><Steps.Trigger><Steps.Indicator>3</Steps.Indicator><Steps.TriggerText>Done</Steps.TriggerText></Steps.Trigger></Steps.Item></Steps.List><Steps.Contentindex={0}><p>Set up your account credentials.</p></Steps.Content><Steps.Contentindex={1}><p>Complete your profile information.</p></Steps.Content><Steps.Contentindex={2}><p>You're all set.</p></Steps.Content></Steps>
States
Use linear to restrict navigation to sequential order. In linear mode, users cannot click ahead — only the next step is reachable.
Set invalid on a Steps.Item to show a danger state on its indicator and
text. Use this when a step has validation errors that prevent progression.
When a completed step is invalid, the check icon is replaced with the step number.
Steps is a compound component. Use Steps.List, Steps.Item, Steps.Trigger, Steps.Indicator, Steps.Separator, Steps.Content, and Steps.CompletedContent to build the stepper.
With progress bar
Use Steps.Progress to show a fill bar based on completion percentage.
Use Steps.NextTrigger and Steps.PrevTrigger with asChild to compose with Roadie Button.
<Stepscount={3}><Steps.List><Steps.Itemindex={0}><Steps.Trigger><Steps.Indicator>1</Steps.Indicator><Steps.TriggerText>Details</Steps.TriggerText></Steps.Trigger><Steps.Separator/></Steps.Item><Steps.Itemindex={1}><Steps.Trigger><Steps.Indicator>2</Steps.Indicator><Steps.TriggerText>Review</Steps.TriggerText></Steps.Trigger><Steps.Separator/></Steps.Item><Steps.Itemindex={2}><Steps.Trigger><Steps.Indicator>3</Steps.Indicator><Steps.TriggerText>Confirm</Steps.TriggerText></Steps.Trigger></Steps.Item></Steps.List><Steps.Contentindex={0}><p>Step one content.</p></Steps.Content><Steps.Contentindex={1}><p>Step two content.</p></Steps.Content><Steps.Contentindex={2}><p>Step three content.</p></Steps.Content><Steps.CompletedContent><pclassName='text-subtle'>All done!</p></Steps.CompletedContent><divclassName='flex gap-2'><Steps.PrevTriggerasChild><Buttonemphasis='subtle'>Back</Button></Steps.PrevTrigger><Steps.NextTriggerasChild><Buttonintent='accent'emphasis='strong'>Next</Button></Steps.NextTrigger></div></Steps>
With custom component
Use Steps.RootProvider with the useSteps hook for external state control.
Keyboard: Arrow keys navigate between step triggers. Enter or Space activates a trigger.
ARIA: List renders as role="tablist", triggers as role="tab", content panels as role="tabpanel". aria-selected marks the active trigger. aria-controls links triggers to panels.
Screen readers: Announce step state via aria-selected. Disabled triggers in linear mode receive aria-disabled.
API reference
Steps
direction?"horizontal" | "vertical" | null
Steps.CompletedContent
No additional props — forwards all standard HTML attributes to the underlying element.
Steps.Content
indexnumber
className?string
Steps.Context
No additional props — forwards all standard HTML attributes to the underlying element.
Steps.Indicator
No additional props — forwards all standard HTML attributes to the underlying element.
Steps.Item
indexnumber
invalid?boolean
className?string
Steps.ItemContext
No additional props — forwards all standard HTML attributes to the underlying element.
Steps.List
No additional props — forwards all standard HTML attributes to the underlying element.
Steps.NextTrigger
No additional props — forwards all standard HTML attributes to the underlying element.
Steps.PrevTrigger
No additional props — forwards all standard HTML attributes to the underlying element.
Steps.Progress
No additional props — forwards all standard HTML attributes to the underlying element.
Steps.RootProvider
No additional props — forwards all standard HTML attributes to the underlying element.
Steps.Separator
No additional props — forwards all standard HTML attributes to the underlying element.
Steps.Trigger
No additional props — forwards all standard HTML attributes to the underlying element.
Steps.TriggerText
No additional props — forwards all standard HTML attributes to the underlying element.