Skip to content

Stepper ​

The steps of a process and where the user is in it.

Pass the steps in steps, and v-model holds the value of the current one. The stepper checks nothing itself: your app or a Smart form decides when to move on.

Installation ​

ts
import { NuiStepper, NuiStepperStep } from '@numior/kit';

Usage ​

Line the steps up in a column and let the user open any step of the order.

orientation
Lays out the steps in a row or a column. A row by default, a column with readonly.

Navigation label for screen readers. Defaults to "Steps" from the dictionary.

Examples ​

Show step statuses in a column ​

Add status and description to the steps.

Steps before the current one count as complete and the ones after it as upcoming, until status sets another state such as error.

Show a guide ​

Pass the steps as NuiStepperStep children and turn on readonly.

  1. Add your products

    A name, a price and one photo are enough; fill in the rest later.

  2. Set up shipping

    Pick the cities and set a price for each zone.

  3. Open the storefront

    Shoppers see the catalog as soon as you publish it.

Any content can sit under a step title. To put a step into the page outline, pass an <h3> heading to the #title slot.

Behavior ​

By default the user goes back only to the steps before the current one, and later steps are plain text. With :linear="false" every step except disabled ones opens. In a narrow container a horizontal stepper hides the labels and shows the current step with "Step 2 of 4" instead.

With readonly no step can be chosen, and without orientation the steps form a column.

Accessibility ​

The stepper is a nav landmark with an ordered list, and the current step carries aria-current="step". A screen reader reads the status with the name, such as "Cart, completed".

Steps the user can open and the current step are buttons, so Tab reaches them one by one. With readonly the stepper is an ordered list without a landmark or buttons.

Keys
Action
⇥
Moves between the step buttons.
↵
Makes the step current.
Space
Makes the step current.

API ​

NuiStepper

Props

Name
Type
Default
Description
steps
readonly NuiStepperStepDescriptor[]
[]
List of steps with value and label, plus optional description, status and disabled.
orientation
NuiStepperOrientation
—
Lays out the steps in a row or a column. A row by default, a column with readonly.
linear
boolean
true
Lets the user go back only to passed steps. Turn it off to allow any step.
readonly
boolean
false
Shows the steps without choosing one: a guide of NuiStepperStep items or progress through steps.
label
string
—
Navigation label for screen readers. Defaults to "Steps" from the dictionary.
completeLabel
string
—
Status of a completed step for screen readers. Defaults to "completed".
errorLabel
string
—
Status of a step with errors for screen readers. Defaults to "has errors".

Models

Name
Type
Default
Description
v-model
string
—
value of the current step.

Slots

Name
Slot props
Description
default
any
NuiStepperStep items in readonly mode.

Texts

Key
Russian
English
complete
выполнено
completed
error
есть ошибки
has errors
label
Шаги
Steps
summary
({ current, total }) => `Шаг ${current} из ${total}`
({ current, total }) => `Step ${current} of ${total}`

NuiStepperStep

Props

Name
Type
Default
Description
title
string
—
Step title next to the number.

Slots

Name
Slot props
Description
title
any
Step title as markup, such as an <h3> for the page outline.
default
any
Step content under the title: text, code, an example.

Edit this page

Search

Esc