Skip to content

Stepper ​

Progress through a multi-step flow (checkout, sign-up, setup wizard).

Usage ​

Horizontal ​

With clickable, completed steps become buttons to go back.

vue
<script setup>
import { ref } from 'vue'

const steps = [
  { label: 'Cart', description: '3 items' },
  { label: 'Shipping', description: 'Address and method' },
  { label: 'Payment', description: 'Card or transfer' },
  { label: 'Confirmation' }
]
const current = ref(1)
</script>

<template>
  <SuStepper v-model="current" :steps="steps" clickable />
</template>

Vertical with content ​

The content slot shows under the current step.

vue
<SuStepper v-model="current" :steps="steps" orientation="vertical">
  <template #content="{ step }">
    <p>Content of the “{{ step.label }}” step.</p>
    <SuButton size="sm" @click="current++">Continue</SuButton>
  </template>
</SuStepper>

Step with an error ​

vue
<SuStepper v-model="current" :steps="[
  { label: 'Cart' },
  { label: 'Shipping', error: true, description: 'Invalid postcode' },
  { label: 'Payment' }
]" />

API ​

Props ​

PropTypeDefaultDescription
modelValuenumber0Current step, from 0 (v-model)
stepsStepItem[][]Steps
orientation'horizontal' | 'vertical''horizontal'Orientation
clickablebooleanfalseCompleted steps are clickable
linearbooleantruefalse: with clickable, upcoming steps are clickable too
size'sm' | 'md' | 'lg''md'Size
ariaLabelstring'Steps' (locale)List name

StepItem ​

PropertyTypeDescription
labelstringLabel
descriptionstringSecondary text
errorbooleanStep that needs attention
disabledbooleanStep that cannot be clicked
iconComponentIcon instead of the number

Events ​

EventPayloadDescription
update:modelValuenumberNew step (v-model)
changenumberStep picked with a click

Slots ​

SlotPropsDescription
content{ step, index }Content under the current step (vertical)

Accessibility ​

  • Named ordered list ("Steps"): the position ("2 of 4") comes from the list.
  • The current step has aria-current="step".
  • The status is read after the label: "Cart, completed", "Shipping, needs attention".
  • Clickable steps are real buttons; the others are not focusable.
  • On mobile (horizontal), only the current step label stays visible; the others are still read.

Publié sous licence MIT.