Skip to content

Stepper

Multi-step navigator for wizards, checkout flows, and onboarding. Built on Reka UI's Stepper primitives.

The compound parts let you assemble the step item exactly the way your design needs it (indicator + title + description, or just indicator + title, or any combination). Each item carries data-state="active|completed|inactive" so theme classes can react to step state without explicit wiring.

bash
npm install @vuecs/navigation
vue
<script setup lang="ts">
import {
    VCStepper,
    VCStepperDescription,
    VCStepperIndicator,
    VCStepperItem,
    VCStepperSeparator,
    VCStepperTitle,
    VCStepperTrigger,
} from '@vuecs/navigation';
import { ref } from 'vue';

const current = ref(2);
const steps = [
    { title: 'Account', description: 'Create your profile' },
    { title: 'Address', description: 'Where to send things' },
    { title: 'Payment', description: 'Add a card' },
];
</script>

<template>
    <VCStepper v-model="current">
        <template v-for="(step, i) in steps" :key="i">
            <VCStepperItem :step="i + 1">
                <VCStepperTrigger>
                    <VCStepperIndicator>{{ i + 1 }}</VCStepperIndicator>
                </VCStepperTrigger>
                <div>
                    <VCStepperTitle>{{ step.title }}</VCStepperTitle>
                    <VCStepperDescription>{{ step.description }}</VCStepperDescription>
                </div>
            </VCStepperItem>
            <VCStepperSeparator v-if="i < steps.length - 1" />
        </template>
    </VCStepper>
</template>
css
@import "tailwindcss";
@import "@vuecs/design";
@import "@vuecs/navigation";

@custom-variant dark (&:where(.dark, .dark *));

Compound API

ComponentWrapsNotes
VCStepperStepperRootHolds active-step state. v-models modelValue (1-based step number). linear blocks navigation past the next incomplete step.
VCStepperItemStepperItemPer-step wrapper. step (1-based) is required. Carries data-state="active|completed|inactive".
VCStepperTriggerStepperTriggerClickable trigger inside a step. Disabled when the step is unreachable in linear mode.
VCStepperIndicatorStepperIndicatorCircular indicator (number / check / icon).
VCStepperTitleStepperTitleStep title.
VCStepperDescriptionStepperDescriptionStep description.
VCStepperSeparatorStepperSeparatorLine between consecutive steps. Carries data-state="completed" when the preceding step is done.

Theme keys

KeyDefault class
rootvc-stepper
itemvc-stepper-item
triggervc-stepper-trigger
indicatorvc-stepper-indicator
titlevc-stepper-title
descriptionvc-stepper-description
separatorvc-stepper-separator

API Reference

<VCStepper>

PropTypeDefaultDescription
modelValuenumberundefinedActive step (1-based). v-model.
defaultValuenumber1Initial active step for uncontrolled usage.
orientation'horizontal' | 'vertical''horizontal'Layout direction.
dir'ltr' | 'rtl'from ConfigManagerReading direction.
linearbooleantrueBlock navigation past the next incomplete step.
themeClassPartial<StepperThemeClasses>undefinedPer-instance theme override.
themeVariantRecord<string, string | boolean>undefinedPer-instance variant values.
EmitPayloadDescription
update:modelValuenumber | undefinedFired when the active step changes.

<VCStepperItem>

PropTypeDefaultDescription
stepnumberrequired1-based step index.
disabledbooleanfalseBlock interaction with this step.
completedbooleanfalseForce completion state. Reka still derives completion from the active step; pass true to override.
Slot propsDescription
state'active' | 'completed' | 'inactive'

Released under the Apache 2.0 License.