Stepper
KStepper is an ordered step indicator.
- Personal Information
- Billing Details
- Shipping Information
html
<KStepper :steps="steps" />
Props
steps
An array of step objects. Each step object should have a required label
property, and an optional state
property.
step
property takes one of the following values:
active
default
pending
completed
error
- Completed step
- Active step
- Pending step
- Erroneous step
- Default step
vue
<template>
<KStepper :steps="steps" />
</template>
<script setup lang="ts">
const steps = ref<StepItem[]>([
{ label: 'Completed step', state: 'completed' },
{ label: 'Active step', state: 'active' },
{ label: 'Pending step', state: 'pending' },
{ label: 'Erroneous step', state: 'error' },
{ label: 'Default step' }
])
</script>
maxLabelWidth
The width of step labels (default is 170px
). We support numbers (will be converted to px
), auto
, and percentages (e.g. 25%
) for values.
- Step a long long long long time ago
- in a galaxy far far away
- Kongponents were battling in space and
- fighting robots and space monsters with lots of explosions
html
<KStepper max-label-width="120" :steps="steps" />