Stepper
Shows progress through active, completed, and upcoming steps. Supports horizontal and vertical layouts.
Installation
npx alixan-ui-nuxt add stepperUsage
Details
2
Payment
3
Confirmation
<script setup lang="ts">
import Stepper from '@/components/ui/stepper/Stepper.vue'
const steps = [
{ id: 1, label: 'componentDocs.stepper.demo.details' },
{ id: 2, label: 'componentDocs.stepper.demo.payment' },
{ id: 3, label: 'componentDocs.stepper.demo.confirmation' },
]
const selected = ref(steps[1])
</script>
<template>
<Stepper :steps="steps" :selected="selected" />
</template>Vertical
Details
2
Payment
3
Confirmation
<script setup lang="ts">
import Stepper from '@/components/ui/stepper/Stepper.vue'
const steps = [
{ id: 1, label: 'componentDocs.stepper.demo.details' },
{ id: 2, label: 'componentDocs.stepper.demo.payment' },
{ id: 3, label: 'componentDocs.stepper.demo.confirmation' },
]
const selected = ref(steps[1])
</script>
<template>
<Stepper :steps="steps" :selected="selected" direction="vertical" />
</template>API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| steps | { id: string | number; label: string }[] | [] | Ordered steps with unique IDs and labels. Labels accept translation keys or plain text. |
| selected | { id: string | number; label: string } | undefined | Active step matched by ID. Earlier steps are completed. If omitted or unknown, all steps are upcoming. Update selected from the parent; the component only displays progress. |
| direction | 'horizontal' | 'vertical' | 'horizontal' | Layout direction of steps and connecting lines. |