Checkout flow
Guide readers through details, payment, and final review in order.
Components / Navigation
An ordered process navigator with an active-step panel and optional linear flow.
npx @getweini/cli@latest add stepperGuide readers through details, payment, and final review in order.
Show the current stage while allowing revisits to completed sections.
<script setup lang="ts">
import { ref } from 'vue'
import Stepper from './components/ui/stepper/Stepper.vue'
const step = ref('details')
const steps = [
{ value: 'details', label: 'Details', description: 'Your information' },
{ value: 'payment', label: 'Payment', description: 'Billing method' },
{ value: 'review', label: 'Review', optional: true },
]
</script>
<template>
<Stepper v-model="step" :items="steps" optional-label="Optional" linear label="Checkout progress">
<template #default="{ item }">Current panel: {{ item.label }}</template>
</Stepper>
</template>The application owns the content and decides when to advance.
<script setup lang="ts">
import { ref } from 'vue'
import Button from './components/ui/button/Button.vue'
import Stepper from './components/ui/stepper/Stepper.vue'
const step = ref('details')
const steps = [{ value: 'details', label: 'Details' }, { value: 'payment', label: 'Payment' }, { value: 'review', label: 'Review' }]
</script>
<template>
<Stepper v-model="step" :items="steps" linear label="Checkout steps">
<template #default="{ item }"><section><h2>{{ item.label }}</h2><Button v-if="step === 'details'" @click="step = 'payment'">Continue</Button></section></template>
</Stepper>
</template>Identify optional work with application-owned text.
<script setup lang="ts">
import Stepper from './components/ui/stepper/Stepper.vue'
const steps = [{ value: 'account', label: 'Account' }, { value: 'profile', label: 'Profile', optional: true }, { value: 'finish', label: 'Finish' }]
</script>
<template>
<Stepper :items="steps" optional-label="Optional" orientation="vertical" label="Setup progress">
<template #default="{ item }"><p>Complete {{ item.label }} to continue.</p></template>
</Stepper>
</template>The most useful props, models, slots, events, and methods for this component.
| Name | Type | Default or requirement |
|---|---|---|
v-model | string | undefined | first enabled item |
items | { value; label; description?; disabled?; optional? }[] | required |
orientation | horizontal | vertical | horizontal |
linear | boolean | false |
label | string | undefined |
optionalLabel | string | undefined |
indicator / label | slots | built-in content |
default | panel slot with { item, index } | empty |
The active step uses aria-current="step". Linear mode permits only the next enabled step while keeping completed steps revisitable; arrows, Home, and End move focus and skip disabled steps.