# Visual Stepper

> Auto-playing vertical stepper whose connector bar grows for the active step while a preview card crossfades per step.

<demo-visual-stepper>



</demo-visual-stepper>

## Installation

```bash
npx shadcn-vue@latest add "https://nxui.geoql.in/r/visual-stepper.json"
```

## Usage

```vue
<script setup lang="ts">
  import VisualStepper from '~/components/ui/visual-stepper/VisualStepper.vue';

  const steps = [
    { title: 'Pick a Skill', description: 'Choose a curated style' },
    { title: 'Copy Skill Expression', description: 'Customize & copy' },
    { title: 'Prompt in Codex', description: 'Type the visual you want' },
    { title: 'Use Visual Asset', description: 'App-ready asset is ready' },
  ];
</script>

<template>
  <VisualStepper v-model="activeStep" :steps="steps" autoplay>
    <template #card="{ index, step }">
      <!-- preview content per step -->
    </template>
  </VisualStepper>
</template>
```

Clicking a step jumps to it. `v-model` tracks the active index. The `#card`
slot receives `index` and `step` for rendering each step's preview panel.

## Props

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        steps
      </code>
    </td>
    
    <td>
      <code>
        VisualStepperStep[]
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Ordered steps (<code>
        title
      </code>
      
      , <code>
        description?
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        v-model
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      Active step index
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        autoplay
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Auto-advance through steps
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        interval
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        2500
      </code>
    </td>
    
    <td>
      Milliseconds each step stays active
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pause-on-hover
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Pause autoplay while hovering
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        show-card
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Render the crossfading preview card column
    </td>
  </tr>
</tbody>
</table>

## Events

<table>
<thead>
  <tr>
    <th>
      Event
    </th>
    
    <th>
      Payload
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        change
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      Fired on step activation
    </td>
  </tr>
</tbody>
</table>
