Krizaka UI
Krizaka UI

Stepper

The steps of a journey or a job: done steps checked, the current one traced by the Krizaka glyph (growing to its value), failures crossed, connectors that fill — and every state said in words.

Web · ✓Mobile · ✓Bureau · ✓BêtaNavigation
Niveau de support
Bêta
Taille
2.1 kB gzip, budget 2.0 kB
Qui l'utilise
8 fichiers des produits et sites en production l'importent (Verikora : 5, Sovkora : 1) Compté dans l'inventaire daté du 2026-11-23.
import { Stepper } from "@krizaka/ui/stepper";

Web et mobile — le même composant pour React et React Native. Bêta : son API peut encore changer à une version mineure.

Pourquoi il est là. Used by Sovkora, Verikora.

Quand l’utiliser

  • A job the user follows in steps: an upload that is checked, transcoded and published; a payout; an import.
  • A short journey with a known order: a checkout, an onboarding (orientation="horizontal").
  • A history of what happened, in order (a timeline of a request).

Quand ne pas l’utiliser

  • For one task with a known size and no steps.À la place : Progress
  • To switch between views the user can visit in any order.À la place : Tabs

Installation

Installer

npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcss

Styles

@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";

Importer

import { Stepper } from "@krizaka/ui/stepper";

Exemples

A job in steps

Uploaded, checked, transcoding (traced, with its Progress and ETA), then published.

A failed step

A cross, the danger colour, “Failed” in words — and the action that fixes it.

A short journey

orientation="horizontal": the connectors fill as it advances.

Props

An ordered list of steps: aria-current="step" on the current one, each state said in words.

PropTypeDéfautDescription
labelsrequisReadonly<Record<StepStatus, string>>—What each state is called, read with every step (“Done”, “In progress”, “Upcoming”, “Failed”) — passed translated.
stepsrequisreadonly Step[]—The steps, in order.
currentnumber0The index of the current step: those before it are done, those after it upcoming (a step's own status wins).
orientation"horizontal" | "vertical"verticalvertical (a job, a timeline) · horizontal (a short journey, a checkout).

Accessibilité

  • An ordered list (name it with aria-label); the current step has aria-current="step".
  • Each step's state is read with its title (labels, translated): never colour alone.
  • Under prefers-reduced-motion the current glyph rests on a still frame and the connectors do not animate.

Bonnes pratiques

  • Name steps by what happens (“Transcoding”), with a line of detail (a size, a time).
  • Put what the user can do or watch into the current or failed step's content: a Progress with its ETA, a retry.
  • A failure says what went wrong and what to do next, in the step itself.

Générée depuis le code de @krizaka/ui 5.3.4 : son meta.ts, ses exemples et ses types.Modifier cette documentation sur GitHub

Sur cette page