Skip to content

Stepper

A stepper component to display progress through a sequence of steps.

Examples

Default

Step 1 of 0
vue
<script setup>
import {
  Stepper,
  StepperItem,
  StepperTrigger,
  StepperIndicator,
  StepperTitle,
  StepperDescription,
  StepperSeparator
} from '@empathyds/vue'

const steps = [
  {
    step: 1,
    title: 'Your Details',
    description: 'Provide your name and email'
  },
  {
    step: 2,
    title: 'Company Details',
    description: 'Provide your company details'
  },
  {
    step: 3,
    title: 'Invite Team',
    description: 'Invite your team members'
  }
]
</script>

<template>
  <Stepper>
    <StepperItem
      v-for="item in steps"
      :key="item.step"
      class="basis-1/3"
      :step="item.step"
    >
      <StepperTrigger>
        <StepperIndicator />
        <div class="flex flex-col">
          <StepperTitle>
            {{ item.title }}
          </StepperTitle>
          <StepperDescription>
            {{ item.description }}
          </StepperDescription>
        </div>
      </StepperTrigger>
      <StepperSeparator
        v-if="item.step !== steps[steps.length - 1].step"
        class="w-full"
      />
    </StepperItem>
  </Stepper>
</template>
</Stepper>
</template>

Props

Stepper

PropTypeDefaultDescription
model-valuenumber-The verified step
default-valuenumber1The default step
orientation'horizontal' | 'vertical''horizontal'The orientation of the stepper
linearbooleantrueWhether the stepper is linear

Slots

Stepper

SlotDescription
defaultThe stepper content

StepperItem

SlotDescription
defaultThe item content

StepperTrigger

SlotDescription
defaultThe trigger content

StepperIndicator

SlotDescription
defaultThe indicator content

StepperTitle

SlotDescription
defaultThe title content

StepperDescription

SlotDescription
defaultThe description content

StepperSeparator

SlotDescription
defaultThe separator content