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/stepperFirst 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.
PropTypeDescription
- stepsrequired
{ title: string; description?: string }[]Steps in order.
- current
numberDefault
0Zero-based index of the active step.
- orientation
"horizontal" | "vertical"Default
"horizontal"Layout direction.
- onStepClick
(index: number) => voidMakes steps clickable.
- className
stringExtra 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
- lib/utilscn (merges class names)
npm packages
- clsx for cn()
- tailwind-merge for cn()
- lucide-react for Check
Accessibility
From the source
Read from this component's code when the site builds, so it can't drift.
- ARIA attributes: aria-current
More navigation
BreadcrumbPath to the current page, with chevrons or slashes.PaginationPage numbers with ellipses for long ranges.DockApp dock that magnifies icons near the pointer.Navigation MenuSite navigation with mega-menu panels.SidebarCollapsible app sidebar with groups, badges and nested items.Scroll ProgressReading progress bar for the page or any scroll container.