vue3-steppy
Steppy
A customizable Stepper component for Vue 3
Demo • Key Features • How To Use • Dependencies • Changelog • Contributing • License
Demo
You can try a live demo here
Key Features
- Keep track of current step
- Change step content
- Configure finalization
- Show loading spinner
- Step descriptions/subtitles
- Clickable step navigation (linear / non-linear)
- Typescript support
- Customizable
- Colors
- Titles
- Descriptions
- Icons
- Button text
- Circle size
- Content spacing
How To Use
Install
$ npm install vue3-steppy
Import
import {Steppy} from 'vue3-steppy'
Use it with v-model:step and put the content of each step in the slot with that step's number:
<template>
<Steppy
v-model:step="step"
:tabs="tabs"
:loading="loading"
:finalize="finish"
>
<template #1>Content of the first step</template>
<template #2>Content of the second step</template>
<template #3>Content of the third step</template>
</Steppy>
</template>
<script setup>
import { ref } from 'vue'
import { Steppy } from 'vue3-steppy'
const step = ref(1)
const loading = ref(false)
const tabs = ref([
{ title: 'Personal Info', description: 'Enter your details', isValid: true },
{ title: 'Account Setup', description: 'Configure your account', isValid: true },
{ title: 'Verification', description: 'Verify your email', isValid: true },
])
const finish = () => {
loading.value = true
}
</script>
For a complete example, see the App.vue file in the repository.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
step |
Number | 1 |
The current step number. |
tabs |
Array | Three placeholder steps | Array of step objects with titles, descriptions, and flags for validity and success icons. |
finalize |
Function | () => {} |
Function to call when the final step is completed. |
backText |
String | "Back" |
Text displayed on the back button. |
nextText |
String | "Next" |
Text displayed on the next button. |
doneText |
String | "Done" |
Text displayed on the done button. |
loading |
Boolean | false |
Indicates whether the final step is in a loading state. |
linear |
Boolean | true |
When true, only completed steps can be clicked to jump back. When false, any step can be clicked. |
primaryColor1 |
String | "orange" |
Primary color for the stepper's theme. |
primaryColor2 |
String | "#fff" |
Secondary color for the stepper's theme. |
backgroundColor |
String | "#fff" |
Background color for the stepper. |
circleSize |
Number | 68 |
Size of the circles in the step indicators. |
contentMarginTop |
Number | 60 |
Top margin of the content area in pixels. Controls spacing between descriptions and content. |
Events
| Event | Payload | Description |
|---|---|---|
update:step |
number |
Emitted with the new step number when Back, Next or a clickable step circle is used. Bind it with v-model:step. |
Slots
| Slot | Description |
|---|---|
#1, #2, ... |
One named slot per step, matching the tab's position in tabs. Its content is shown while that step is active. |
Tab Object Structure
Each tab object in the tabs array should have the following properties:
| Property | Type | Required | Description |
|---|---|---|---|
title |
String | Yes | The title of the step. |
description |
String | No | Optional subtitle/description text below title. |
isValid |
Boolean | Yes | Whether the step is valid and can proceed. |
iconSuccess |
String | No | Optional custom icon URL for completed steps. |
Example Tab Object
{
title: 'Personal Information',
description: 'Enter your details',
isValid: true,
iconSuccess: null
}
Development
pnpm install
pnpm dev # run the demo locally
pnpm test # component tests in a real browser (Vitest browser mode + Playwright)
pnpm test:types # type-check the public typings
The tests run in headless Chromium. Install it once with pnpm exec playwright install chromium. Use pnpm test:watch while working on the tests.
Dependencies
This software uses the following open source packages:
- Vue 3 (3.5+, a peer dependency: install it in your app)
Dev Dependencies
Changelog
See CHANGELOG.md for the release history.
Contributing
Contributions are welcome. Please read CONTRIBUTING.md, the Code of Conduct and ACCESSIBILITY.md first. Security issues go through SECURITY.md, not public issues.
License
GitHub Laximas ·
Related Packages
Vue bindings for SmartWizard - modern, framework-agnostic wizard/stepper compone...
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.7.1 | ^3.5.0 | MIT | |
| 1.7.0 | ^3.5.44 | MIT | |
| 1.6.3 | ^3.5.39 | MIT | |
| 1.6.2 | ^3.5.35 | MIT | |
| 1.6.1 | ^3.5.32 | MIT | |
| 1.6.0 | ^3.5.30 | MIT | |
| 1.5.14 | ^3.5.29 | MIT | |
| 1.5.13 | ^3.5.28 | MIT | |
| 1.5.12 | ^3.5.28 | MIT | |
| 1.5.11 | ^3.5.27 | MIT | |
| 1.5.10 | ^3.5.26 | MIT | |
| 1.5.9 | ^3.5.22 | MIT | |
| 1.5.8 | ^3.5.16 | MIT | |
| 1.5.6 | ^3.5.13 | MIT | |
| 1.5.5 | ^3.5.13 | MIT | |
| 1.5.4 | ^3.5.13 | MIT | |
| 1.5.3 | ^3.5.8 | MIT | |
| 1.5.2 | ^3.4.29 | MIT | |
| 1.5.1 | ^3.4.21 | MIT | |
| 1.5.0 | ^3.4.21 | MIT | |
| 1.4.0 | ^3.4.21 | MIT | |
| 1.3.2 | ^3.4.15 | MIT | |
| 1.3.1 | ^3.4.14 | MIT | |
| 1.3.0 | ^3.3.10 | MIT | |
| 1.2.1 | ^3.3.4 | MIT | |
| 1.2.0 | ^3.3.4 | MIT | |
| 1.1.1 | ^3.3.4 | MIT | |
| 1.1.0 | ^3.2.13 | MIT | |
| 1.0.2 | ^3.2.13 | MIT | |
| 1.0.1 | ^3.2.13 | MIT |
Showing the latest 30 of 31. See every release on npm