Skip to contentKino
Skip to Content

Stepper

Where a person is in a flow of steps, such as a checkout or a setup. When the current step moves, the lines between fill one after another and the ring travels to its new step.

npx shadcn add https://kinoui.com/r/stepper.json
Share on

Examples

Upgrade Kino to Team

Billing details

Company
Kino Ltd
Address
14 Wharf Street, Leeds LS2 7EQ
VAT number
GB 284 9917 06

Default

A checkout with Back and Continue. Continue: the line fills and the ring moves on; pick a step already done to go back to it.

Set up Kino

Vertical

orientation="vertical" stacks the steps, as the Timeline does. An optional step says so in its description.

Set up Kino

Error

status="error" marks a step that needs another look, with a mark of its own. Try again clears it and moves on.

Import 1,284 notes from Notion

  1. Completed:
    Upload
  2. Completed:
    Match fields
  3. Check
  4. Upcoming:
    Import

Shown only

Without StepperTrigger, the stepper only shows where things are, such as an import that runs on its own.

Installation

npx shadcn@latest add https://kinoui.com/r/stepper.json
Files
lib/reduce-motion.tslib/step.tslib/resize.tslib/choice.tslib/refs.tscomponents/kino/stepper.tsx
Packages
@base-ui/react

New to Kino? Installation covers what your project needs first and the @kino namespace.

API reference

Stepper

PropTypeDefaultDescription
valuenumberNoneThe current step, from 0. Steps before it are complete and steps after it upcoming; one past the last marks every step complete.
defaultValuenumber0The current step when you don’t control it.
onValueChange(value: number) => voidNoneCalled when a StepperTrigger picks its step.
orientation"horizontal""vertical""horizontal"A row with the titles beside the markers, or a column.
linearbooleantrueA linear flow goes back to steps already reached but not on to upcoming ones, whose triggers are disabled. false lets every step be picked.
containerClassNamestringNoneClasses for the box around the list.

StepperItem

PropTypeDefaultDescription
stepnumberNoneIts place in the flow, from 0.
status"complete""current""upcoming""error"NoneSets the status instead of taking it from the Stepper’s value, such as error on a step that needs another look.

Data attributes

AttributeOnDescription
data-orientation[data-slot=stepper-list]The orientation.
data-statusStepperItemThe step’s status.
data-passedStepperItemPresent once the current step is after this one.

CSS variables

VariableSet it onDefaultDescription
--stepper-markerSteppervar(--control-height-xs)The size of a marker.
--stepper-gapSteppervar(--control-padding), or var(--surface-gap) when verticalThe space between steps.

Accessibility

  • The stepper is an ordered list, not a tab list: an upcoming step in a linear flow can’t be reached, so there are no panels to switch. Name it with aria-label or aria-labelledby, and put it in a <nav> when its steps are links.
  • The current step is aria-current="step", on its trigger when it has one. The others read their status before their title: “Completed”, “Upcoming” or “Error”.
  • Done and error steps show a tick and an exclamation mark, and the current marker takes an outline in forced colours, so the status never relies on colour.
  • Triggers are buttons or links in the tab order; a disabled one leaves it. Markers and lines are hidden from screen readers.
  • When the step changes, say so in a role="status" region, such as “Step 2 of 4: Billing details”, as the examples do.
  • When the system asks for less motion, lines fill and markers change at once.