Skip to content
synccn

Stepper

Progress through a multi-step flow.

Step 2 of 4

Playground

Change the props and copy the code. The controls come from the component's TypeScript types.

Props

current1
orientation
import { Stepper } from "@/components/ui/stepper";<Stepper steps={[{"title":"Account"},{"title":"Workspace"},{"title":"Invite team"}]} current={1} />

Installation

$ pnpm dlx shadcn@latest add @synccn/stepper

First time in this project? Connect synccn with one command.

Usage

import { Stepper } from "@/components/ui/stepper";<Stepper steps={steps} current={1} />

API reference

Generated from the component's TypeScript types, so it always matches the code.

Stepper

steps: [{ title, description? }]. `current` is the zero-based active step.

  • stepsrequired
    { title: string; description?: string }[]

    Steps in order.

  • current
    number

    Default 0

    Zero-based index of the active step.

  • orientation
    "horizontal" | "vertical"

    Default "horizontal"

    Layout direction.

  • onStepClick
    (index: number) => void

    Makes steps clickable.

  • className
    string

    Extra classes for the root element.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

  • ARIA attributes: aria-current