Components

Stepper

Multi-step progress and navigation with linear rules, roving focus, and associated panels.

Stepper represents progress through a multi-step process. It renders an ordered list, connects each trigger to a panel, and supports linear or free navigation.

Stepper coordinates navigation. Application code owns step validation and persistence.

Anatomy

  • #item: Replaces one generated trigger body. Per-item named slots are supported through item.slot.
  • #indicator: Step number or status visual.
  • #title: Accessible step title.
  • #description: Optional accessible step description.
  • #optional: Optional-step label.
  • #separator: Connector between adjacent steps.
  • #panel: Shared panel content for each item.
  • #panel-[value]: Value-specific panel content.
  • #previous: Previous control content when showControls is enabled.
  • #next: Next control content when showControls is enabled.
  • #state: Optional renderless current-step state and navigation actions.

Titles, descriptions, triggers, and panels receive unique SSR-safe ids. Keep title content meaningful because it labels the generated trigger and panel.

Usage

Add account details.

Examples

Linear flow

Linear mode is enabled by default. Users can revisit completed steps or advance one step, but cannot skip unfinished steps.

<template>
  <Stepper v-model="step" :items="items" linear />
</template>

Non-linear flow

Disable linear when every enabled step can be opened directly.

<template>
  <Stepper v-model="step" :items="items" :linear="false" />
</template>

Vertical orientation

Vertical orientation switches arrow navigation to Up and Down and exposes matching orientation data attributes.

<template>
  <Stepper v-model="step" :items="items" orientation="vertical" />
</template>

Completed, optional, and disabled items

Item metadata can override derived completion or block a step. Disabled steps are skipped by roving focus.

<script setup lang="ts">
const items = [
  { value: "account", title: "Account", completed: true },
  { value: "profile", title: "Profile", optional: true },
  { value: "billing", title: "Billing", disabled: true },
];
</script>

<template>
  <Stepper v-model="step" :items="items" :linear="false" />
</template>

Application validation

Cancel a proposed step change until application validation passes. Akaza does not hide workflow validation inside the visual primitive.

<template>
  <Stepper
    v-model="step"
    :items="items"
    @value-change="(_value, details) => {
      if (!currentStepIsValid) details.cancel()
    }"
  />
</template>

API Reference

Model

ModelTypeDefaultDescription
v-modelstring | number | undefinedfirst enabled itemActive item value.

Item shape

KeyTypeDescription
valuestring | numberStable step value. Falls back to one-based index.
titlestringAccessible title.
descriptionstringOptional accessible description.
contentstringDefault panel content.
disabledbooleanBlocks trigger and navigation.
completedbooleanOverrides derived completion.
optionalbooleanMarks the step optional.
slotstringNamed slot used instead of #item.

Props

PropTypeDefaultDescription
itemsStepperItem[]requiredStep data.
valueKeystring"value"Custom item value key.
titleKeystring"title"Custom title key.
descriptionKeystring"description"Custom description key.
disabledKeystring"disabled"Custom disabled key.
completedKeystring"completed"Custom completed key.
linearbooleantrueRequires ordered progression.
disabledbooleanfalseDisables all step triggers.
loopbooleanfalseLoops roving keyboard focus.
orientation"horizontal" | "vertical""horizontal"Layout and arrow-key axis.
activationMode"manual" | "automatic""manual"Whether arrow focus also changes active step.
showControlsbooleanfalseRenders generated previous/next buttons.
unmountOnHidebooleanfalseUnmounts inactive panels instead of hiding them.
dir"ltr" | "rtl""ltr"Horizontal keyboard direction.
ariaLabelstring"Progress steps"Accessible ordered-list label.
uiStepperUiClasses for structural parts.

Emits

EventPayloadDescription
update:modelValuevalueFired after an accepted step change.
value-change(value, details)Fired before step activation. details.cancel() prevents it.
complete(value, details)Fired when the final item becomes active.

Slots

SlotPropsDescription
item / item slotitem, index, value, state, isActive, isCompleted, isDisabled, selectEntire trigger body.
indicatoritem, index, stateGenerated indicator content.
titleitem, indexAccessible title content.
descriptionitem, indexAccessible description content.
optionalitem, indexOptional label content.
separatoritem, index, isCompletedConnector content.
panelitem, index, valueShared panel content.
panel-[value]item, index, value, isActiveValue-specific panel content.
previousdisabled, previousPrevious button content.
nextdisabled, nextNext button content.
statecurrent state and all navigation methodsOptional state-driven custom controls.

Methods

MethodDescription
goToStep(value, event?)Activates a permitted step.
nextStep(event?)Activates the next permitted step.
prevStep(event?)Activates the previous permitted step.
hasNext()Returns whether a next permitted step exists.
hasPrev()Returns whether a previous permitted step exists.

UI Options

KeyDescription
rootRoot wrapper.
listOrdered step list.
itemStep list item.
triggerStep button.
indicatorNumber/status wrapper.
textTitle/description wrapper.
titleStep title.
descriptionStep description.
optionalOptional label.
separatorConnector.
panelsPanels wrapper.
panelOne associated panel.
controlsGenerated controls wrapper.
previousPrevious button.
nextNext button.

Styling Hooks

UI keyCSS classData attrs
rootakaza-stepper`data-akaza-state="empty
listakaza-stepper-listdata-akaza-orientation
itemakaza-stepper-item`data-akaza-state="active
triggerakaza-stepper-triggeritem state and disabled attrs, native aria-current
indicatorakaza-stepper-indicatorinherited through parent state selectors
textakaza-stepper-textinherited through parent state selectors
titleakaza-stepper-title
descriptionakaza-stepper-description
optionalakaza-stepper-optional
separatorakaza-stepper-separator`data-akaza-state="completed
panelsakaza-stepper-panels
panelakaza-stepper-panel`data-akaza-state="active
controlsakaza-stepper-controls
previousakaza-stepper-previousnative disabled attr
nextakaza-stepper-nextnative disabled attr

Plain class applies to the root wrapper. Use ui.trigger, ui.indicator, and ui.panel for the main generated parts.

Keyboard

KeyBehavior
ArrowRight / ArrowLeftMove roving focus horizontally, respecting RTL.
ArrowDown / ArrowUpMove roving focus vertically.
HomeFocus first permitted step.
EndFocus last permitted step.
Enter / SpaceActivate focused step in manual mode.

With activationMode="automatic", arrow-key focus also activates the destination step.