Skip to content

Stepper

Guide a user through ordered tasks with progress and eligibility rules.

Usage

Checkout

Move through an ordered checkout flow one available step at a time.

Move through an ordered checkout flow one available step at a time.

Step 2 of 4Delivery

Address and shipping method

Controlled

Let the parent own the current value and apply accepted changes back to the component.

Let the parent own the current value and apply accepted changes back to the component.

Step 2 of 4Delivery

Address and shipping method

Examples

Gated step

Block forward movement until the current step satisfies its completion rule.

Block forward movement until the current step satisfies its completion rule.

Step 2 of 4Delivery

Address and shipping method

API

Vue package: @sectile/vue/stepper

Components
  • StepperRoot
  • StepperList
  • StepperStep
  • StepperContent
  • StepperIndicator
  • StepperPrevious
  • StepperNext

Props

StepperRootProps

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

defaultValue

Initial value used when the component owns its state.

disabled

Whether interaction is unavailable.

disabledItems

Item values excluded from focus and selection.

items

Ordered item values managed by the component.

modelValue

Current value when state is controlled by the parent.

orientation

Axis used for layout and keyboard movement.

readonly

Whether the value can be inspected but not changed.

StepperActionProps

as

Element or component rendered for this part.

asChild

Whether to merge this part into its single child instead of rendering a wrapper.

disabled

Whether interaction is unavailable.

Slots

StepperActionSlotProps

disabled

Whether interaction is unavailable.

targetValue

Value the action will activate, or null when no enabled step remains in that direction.

value

Current value exposed by this contract.

Events

StepperRoot

activate

Emitted when an item becomes active.

highlight

Emitted when the highlighted item changes.

update:modelValue

Emitted when the component requests a new controlled value.

Other types

StepperValueChangeHandler

ts
type StepperValueChangeHandler = (value: string) => void

StepperHighlightHandler

ts
type StepperHighlightHandler = (value: string | null) => void

StepperActivateHandler

ts
type StepperActivateHandler = (value: string) => void

Parts

Shared scope: [data-scope="stepper"]. Combine it with a part selector to keep styles local to this component.

PartSelectorRoleExtra attributes
root[data-part="root"]Defines the component boundary and owns its composed parts.
list[data-part="list"]Groups the component items in navigation order.
step[data-part="step"]Represents one ordered workflow step.
indicator[data-part="indicator"]Shows state or position without replacing the primary content.
content[data-part="content"]Contains the component content shown for the active state.
previous[data-part="previous"]Activates and focuses the previous enabled step.data-target-value="<value>"
data-disabled=""
next[data-part="next"]Activates and focuses the next enabled step.data-target-value="<value>"
data-disabled=""

Keyboard interaction

KeyBehavior
Arrow Left / Arrow RightMove between tabs in a horizontal list.
Arrow Up / Arrow DownMove between tabs in a vertical list.
Home / EndMove to the first or last tab.
Enter / SpaceActivate the focused tab in manual activation mode.

Accessibility

The ordered step list exposes the current step and associates each step trigger with its content panel.

Released under the MIT License.