DevExtreme v25.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

Vue Stepper - Overview

The DevExtreme Stepper allows you to indicate progress within a multi-step process and allows users to navigate between individual steps. Use our Stepper UI component to implement multi-page navigation in lengthy forms such as store/cart checkout.

To get started with DevExtreme Stepper, refer to the following step-by-step tutorial: Getting Started with Stepper.

Backend API
<template> <div class="stepper-demo"> <div class="widget-container"> <div :class="['widget-wrapper', 'widget-wrapper-' + orientation]"> <div v-for="config in stepperConfigs" :key="config.id" class="stepper-wrapper" > <div :id="config.labelId" class="stepper-label"> {{ config.title }} </div> <DxStepper :id="config.id" :element-attr="{ 'aria-labelledby': config.labelId }" :selected-index="2" :orientation="orientation" :linear="navigationMode" :select-on-focus="selectOnFocus" :rtl-enabled="rtlMode" > <DxItem v-for="(step, index) in steps" :key="index" v-bind="getItemProps(step, config.fields)" /> </DxStepper> </div> </div> </div> <div class="options"> <div class="caption">Options</div> <div class="option"> <div>Orientation</div> <DxButtonGroup id="orientation" key-expr="value" :items="orientations" :selected-item-keys="[orientation]" @item-click="onOrientationClick" /> </div> <div class="option"> <div>Navigation Mode</div> <DxButtonGroup id="navigationMode" key-expr="value" :items="navigationModes" :selected-item-keys="[navigationMode]" @item-click="onNavigationModeClick" /> </div> <div class="option-separator" /> <div class="option"> <DxCheckBox id="selectOnFocus" text="Select step on focus" v-model:value="selectOnFocus" /> </div> <div class="option"> <DxCheckBox id="rtlMode" text="Right-to-left mode" v-model:value="rtlMode" /> </div> </div> </div> </template> <script setup lang="ts"> import { ref } from 'vue'; import { DxStepper, DxItem } from 'devextreme-vue/stepper'; import { DxButtonGroup, type DxButtonGroupTypes } from 'devextreme-vue/button-group'; import { DxCheckBox } from 'devextreme-vue/check-box'; import { steps, orientations, navigationModes } from './data.ts'; const orientation = ref(orientations[0].value); const navigationMode = ref(navigationModes[0].value); const selectOnFocus = ref(true); const rtlMode = ref(false); function onOrientationClick(e: DxButtonGroupTypes.ItemClickEvent) { orientation.value = e.itemData.value; } function onNavigationModeClick(e: DxButtonGroupTypes.ItemClickEvent) { navigationMode.value = e.itemData.value; } const stepperConfigs = [ { id: 'icons', labelId: 'iconsLabel', title: 'Icons and Labels', fields: ['label', 'icon', 'optional'] as const, }, { id: 'numbers', labelId: 'numbersLabel', title: 'Numbers and Labels', fields: ['label', 'optional'] as const, }, { id: 'customText', labelId: 'customTextLabel', title: 'Custom Text', fields: ['text'] as const, }, ]; function getItemProps(step, fields) { return fields.reduce((acc, field) => { if (field in step) { acc[field] = step[field]; } return acc; }, {} as Record<string, unknown>); } </script> <style scoped> #app { display: flex; flex-direction: column; } .stepper-demo { display: flex; height: 580px; gap: 20px; } .widget-container { display: flex; align-items: center; justify-content: center; width: calc(100% - 280px); min-width: 320px; overflow: clip; gap: 20px; } .widget-wrapper { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; row-gap: 80px; width: 100%; height: 100%; } .widget-wrapper-vertical { display: flex; flex-direction: row; justify-content: space-around; } .widget-wrapper-vertical .stepper-wrapper { width: auto; max-width: 33%; } .widget-wrapper-vertical .stepper-label { text-align: center; white-space: nowrap; } .widget-wrapper-vertical #customText { width: auto; } .dx-stepper-vertical { height: 400px; width: 100%; } .stepper-wrapper { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; } .stepper-label { font-weight: 600; } .options { display: flex; flex-direction: column; flex-shrink: 0; width: 300px; box-sizing: border-box; padding: 20px; background-color: rgba(191, 191, 191, 0.15); gap: 16px; height: 100%; } .caption { font-weight: 500; font-size: 18px; } .option { display: flex; flex-direction: column; row-gap: 4px; } .option-separator { border-bottom: 1px solid var(--dx-color-border); } .dx-buttongroup .dx-button { width: 50%; } </style>
window.exports = window.exports || {}; window.config = { transpiler: 'plugin-babel', meta: { '*.vue': { loader: 'vue-loader', }, '*.ts': { loader: 'demo-ts-loader', }, '*.svg': { loader: 'svg-loader', }, 'devextreme/time_zone_utils.js': { 'esModule': true, }, 'devextreme/localization.js': { 'esModule': true, }, 'devextreme/viz/palette.js': { 'esModule': true, }, 'openai': { 'esModule': true, }, }, paths: { 'project:': '../../../../', 'npm:': 'https://cdn.jsdelivr.net/npm/', 'bundles:': '../../../../bundles/', 'externals:': '../../../../bundles/externals/', }, map: { 'vue': 'npm:vue@3.4.27/dist/vue.esm-browser.js', '@vue/shared': 'npm:@vue/shared@3.4.27/dist/shared.cjs.prod.js', 'vue-loader': 'npm:dx-systemjs-vue-browser@1.1.2/index.js', 'demo-ts-loader': 'project:utils/demo-ts-loader.js', 'jszip': 'npm:jszip@3.10.1/dist/jszip.min.js', 'svg-loader': 'project:utils/svg-loader.js', 'mitt': 'npm:mitt/dist/mitt.umd.js', 'rrule': 'npm:rrule@2.6.4/dist/es5/rrule.js', 'luxon': 'npm:luxon@3.4.4/build/global/luxon.min.js', 'es6-object-assign': 'npm:es6-object-assign', 'devextreme': 'npm:devextreme@25.1.3/cjs', 'devextreme-vue': 'npm:devextreme-vue@25.1.3/cjs', 'devextreme-quill': 'npm:devextreme-quill@1.7.3/dist/dx-quill.min.js', 'devexpress-diagram': 'npm:devexpress-diagram@2.2.19/dist/dx-diagram.js', 'devexpress-gantt': 'npm:devexpress-gantt@4.1.62/dist/dx-gantt.js', 'inferno': 'npm:inferno@8.2.3/dist/inferno.min.js', 'inferno-compat': 'npm:inferno-compat/dist/inferno-compat.min.js', 'inferno-create-element': 'npm:inferno-create-element@8.2.3/dist/inferno-create-element.min.js', 'inferno-dom': 'npm:inferno-dom/dist/inferno-dom.min.js', 'inferno-hydrate': 'npm:inferno-hydrate/dist/inferno-hydrate.min.js', 'inferno-clone-vnode': 'npm:inferno-clone-vnode/dist/inferno-clone-vnode.min.js', 'inferno-create-class': 'npm:inferno-create-class/dist/inferno-create-class.min.js', 'inferno-extras': 'npm:inferno-extras/dist/inferno-extras.min.js', '@preact/signals-core': 'npm:@preact/signals-core@1.8.0/dist/signals-core.min.js', 'plugin-babel': 'npm:systemjs-plugin-babel@0.0.25/plugin-babel.js', 'systemjs-babel-build': 'npm:systemjs-plugin-babel@0.0.25/systemjs-babel-browser.js', // Prettier 'prettier/standalone': 'npm:prettier@2.8.8/standalone.js', 'prettier/parser-html': 'npm:prettier@2.8.8/parser-html.js', }, packages: { 'devextreme-vue': { main: 'index.js', }, 'devextreme-vue/common': { main: 'index.js', }, 'devextreme': { defaultExtension: 'js', }, 'devextreme/events/utils': { main: 'index', }, 'devextreme/common/core/events/utils': { main: 'index', }, 'devextreme/events': { main: 'index', }, 'es6-object-assign': { main: './index.js', defaultExtension: 'js', }, }, packageConfigPaths: [ 'npm:@devextreme/*/package.json', ], babelOptions: { sourceMaps: false, stage0: true, }, }; System.config(window.config);
import { type Orientation } from "devextreme-vue/common"; export const steps = [ { text: 'A', label: 'Cart', icon: 'cart', }, { text: 'B', label: 'Shipping Info', icon: 'clipboardtasklist', }, { text: 'C', label: 'Promo Code', icon: 'gift', optional: true, }, { text: 'D', label: 'Checkout', icon: 'packagebox', }, { text: 'E', label: 'Ordered', icon: 'checkmarkcircle', }, ]; export const orientations: Array<{ text: string; value: Orientation }> = [ { text: 'Horizontal', value: 'horizontal' }, { text: 'Vertical', value: 'vertical' }, ]; export const navigationModes = [ { text: 'Non-linear', value: false }, { text: 'Linear', value: true }, ];
import { createApp } from 'vue'; import themes from 'devextreme/ui/themes'; import App from './App.vue'; themes.initialized(() => createApp(App).mount('#app'));
<!DOCTYPE html> <html lang="en"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/25.1.3/css/dx.light.css" /> <script type="module"> import * as vueCompilerSFC from "https://cdn.jsdelivr.net/npm/@vue/compiler-sfc@3.4.27/dist/compiler-sfc.esm-browser.js"; window.vueCompilerSFC = vueCompilerSFC; </script> <script src="https://cdn.jsdelivr.net/npm/typescript@5.4.5/lib/typescript.js"></script> <script src="https://cdn.jsdelivr.net/npm/core-js@2.6.12/client/shim.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/systemjs@0.21.3/dist/system.js"></script> <script type="text/javascript" src="config.js"></script> <script type="text/javascript"> System.import("./index.ts"); </script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="app"> </div> </div> </body> </html>

Component Configuration

The following settings are available to you:

  • orientation (default: horizontal)
    Stepper orientation (horizontal or vertical).

  • linear (default: true)
    Specifies whether users must navigate the Stepper sequentially or can skip steps.

  • selectOnFocus (default: true)
    Specifies whether steps focused with keyboard navigation are selected automatically.

  • rtlEnabled (default: false)
    Switches the Stepper to Right-to-Left mode.

Step Settings

To add steps, populate the items collection or specify a dataSource.

Use the following properties to customize steps:

  • text
    Indicator text. If you do not define this option, Stepper numbers steps sequentially.

  • icon
    Indicator icon. Stepper prioritizes icons over the text property.

  • label
    Step caption displayed next to the indicator.

  • optional
    Adds an (Optional) label to the step.

  • isValid
    Allows you to indicate step-related validation errors.

  • disabled
    Deactivates the step.

  • hint
    Tooltip text for the step.

  • template
    Allows you to customize step-related appearance. This property overrides all other step settings.