Primitives

Stepper

Where someone is in a flow of a few steps: onboarding, a setup, an import. An ordered list; the current step is marked for screen readers and takes the ◆, done steps a check, a step that needs attention a warning, and each step's state is read in words. The line to the next step fills when one is done. Below 640px a horizontal stepper keeps only the current label in view. Server safe.

view .md
Preview
  1. Account, completedName and email
  2. Connect a bank, current stepRead only
  3. First budget, not startedTwo minutes
  4. Done, not started
vertical, a step that needs attention
  1. Account, completedName and email
  2. Connect a bank, needs attentionRead only
  3. First budget, current stepTwo minutes
Installation
terminal
bash
npx @entrepta/cli@latest add stepper

// Resolves dependencies, copies the source, and installs npm packages automatically.

Usage
stepper.tsx
tsx
import { Stepper } from "@/components/entrepta/stepper"

<Stepper
  steps={[
    { id: "account", label: "Account" },
    { id: "bank", label: "Connect a bank", description: "Read only" },
    { id: "budget", label: "First budget" },
  ]}
  current="bank"
/>
Props
PropTypeDefaultDescription
steps{ id, label, description? }[]-In order
currentstring-The id of the step in progress
completedstring[]every step before currentThe ids of the steps done
erroredstring[]-Steps that need attention; wins over completed
orientation"horizontal" | "vertical""horizontal"A row, or a column with every label
labels{ complete?, current?, error?, upcoming? }-The state words
Active theme: entrepta, dark mode.