shadcn-vue/apps/www/src/content/docs/components/stepper.md
2024-08-02 15:50:38 +04:00

1.3 KiB

title description source primitive
Stepper A set of steps that are used to indicate progress through a multi-step process. apps/www/src/lib/registry/default/ui/stepper https://www.radix-vue.com/components/stepper.html

Installation

npx shadcn-vue@latest add stepper

Usage

<script setup lang="ts">
import {
  Stepper,
  StepperDescription,
  StepperIndicator,
  StepperItem,
  StepperSeparator,
  StepperTitle,
  StepperTrigger,
} from '@/components/ui/stepper'
</script>

<template>
  <Stepper>
    <StepperItem :step="1">
      <StepperTrigger>
        <StepperIndicator>1</StepperIndicator>
        <StepperTitle>Step 1</StepperTitle>
        <StepperDescription>This is the first step</StepperDescription>
      </StepperTrigger>
      <StepperSeparator />
    </StepperItem>
    <StepperItem :step="2">
      <StepperTrigger>
        <StepperIndicator>2</StepperIndicator>
        <StepperTitle>Step 2</StepperTitle>
        <StepperDescription>This is the second step</StepperDescription>
      </StepperTrigger>
    </StepperItem>
  </Stepper>
</template>

Examples

Horizontal

Vertical

Form