Krizaka
Documentation

Step progress

The head of a multi-step flow — a sign-up, a profile to fill: back, segments that fill, the position in words.

Web + MobileBetaNavigation

Web and mobile — the same component for React and React Native. Beta: its API may still change in a minor version.

When to use

  • The onboarding of a dating app: name, birth date, photos, interests, location.
  • A checkout in several steps.

When not to use

  • For the steps of a running process.Use instead: Stepper
  • For a first launch's promises.Use instead: Onboarding

Installation

Install

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

Styles

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

Import

import { StepProgress } from "@krizaka/ui/step-progress";

Examples

Sign-up

Step 2 of 5, back and skip.

Props

The head of a sign-up or a profile to fill: back, segments that fill, the position in words.

PropTypeDefaultDescription
labelrequired(step: number, total: number) => string—The position in words: (n, total) => "Step " + n + " of " + total — passed translated.
steprequirednumber—The current step, from 1.
totalrequirednumber—How many steps.
backReactNode—The back link or button (a Button), at the left.
classNamestring—Classes merged on the root.
trailingReactNode—At the right: a Skip link.

Accessibility

  • A progressbar named and valued by the position in words.

Best practices

  • Five steps or fewer; let people skip what is optional.
  • Keep the position in words (label).

Generated from the code of @krizaka/ui 3.5.0: its meta.ts, its examples and its types.Edit this documentation on GitHub

On this page