Menu

Stepper

Progress steps. 4 statuses.

  1. Cart3 items
  2. 2AddressWhere to?
  3. 3PaymentbKash or card

Installation

$ npx uix-ui@latest add stepper

This copies the file into components/ui/stepper.tsx in your project. npx shadcn@latest add @uix/stepper works too.

Usage

stepper.tsx
import { Stepper, Step } from "@/components/ui/stepper";

<Stepper>
  <Step status="complete" title="Cart" description="3 items" />
  <Step status="current" index={2} title="Address" description="Where to?" />
  <Step status="upcoming" index={3} title="Payment" description="bKash or card" />
</Stepper>

Examples

Moving through steps

  1. Cart
  2. 2Address
  3. 3Payment
  4. 4Done

Props

PropTypeDefaultDescription
statuscomplete | current | upcoming | error"complete"
indexnumber–Number shown in the circle while the step is current, upcoming or in error.
titleReact.ReactNode–
descriptionReact.ReactNode–

Everything else is passed to the root element, so className, aria-* and event handlers work as usual.

Dependencies

Installed for you by the CLI.

  • class-variance-authority
  • clsx
  • tailwind-merge
  • lib/utils.ts
  • components/ui/icons.tsx
This file exports 2 parts: Stepper, Step. Use only the ones you need.
esc

↑↓ to navigate · ↵ to select · esc to close