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
import { NuiStepper, NuiStepperStep } from '@numior/kit';Usage
Line the steps up in a column and let the user open any step of the order.
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.
- Add your products
A name, a price and one photo are enough; fill in the rest later.
- Set up shipping
Pick the cities and set a price for each zone.
- 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.