Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Desktop Window
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Frame
- Heading
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Live Waveform
- Marker
- Menubar
- Message
- Message Scroller
- Meter
- Meter Ring
- Native Select
- Navigation Menu
- NumberCount
- Pagination
- Popover
- Progress
- Progress Ring
- Questionnaire
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Stepper
- Switch
- Table
- Tabs
- Textarea
- Timeline
- Toast
- Toggle
- Toggle Group
- Tooltip
Compositions
Utilities
Step 2 content
"use client"
import {Installation#
bunx --bun shadcn@latest add @ondo-ui/stepper
Usage#
import {
Stepper,
StepperContent,
StepperIndicator,
StepperItem,
StepperNav,
StepperPanel,
StepperSeparator,
StepperTrigger,
} from "@/components/ui/stepper"<Stepper defaultValue={1}>
<StepperNav>
<StepperItem step={1}>
<StepperTrigger>
<StepperIndicator>1</StepperIndicator>
</StepperTrigger>
<StepperSeparator />
</StepperItem>
<StepperItem step={2}>
<StepperTrigger>
<StepperIndicator>2</StepperIndicator>
</StepperTrigger>
</StepperItem>
</StepperNav>
<StepperPanel>
<StepperContent value={1}>Content 1</StepperContent>
<StepperContent value={2}>Content 2</StepperContent>
</StepperPanel>
</Stepper>Examples#
States#
Step 2 content
"use client"
import {Indicators#
Step 2 content
"use client"
import { IconCheck, IconLoader2 } from "@tabler/icons-react"Controlled#
Step 2 content
"use client"
import { useState } from "react"Progress#
1 / 4
Step 1 content
"use client"
import { useState } from "react"Title#
Step 2 content
"use client"
import { IconCheck, IconLoader2 } from "@tabler/icons-react"Title & Bar#
Payment Info content
"use client"
import {Title & Status#
Payment Info content
"use client"
import { useState } from "react"Title & Description#
Profile content
"use client"
import { IconCheck, IconLoader2 } from "@tabler/icons-react"Inline Title#
Profile content
"use client"
import { IconCheck, IconLoader2 } from "@tabler/icons-react"Inline Title & Description#
Step 2 content
"use client"
import { IconCheck, IconLoader2 } from "@tabler/icons-react"Vertical#
Step 2 content
"use client"
import { IconCheck, IconLoader2 } from "@tabler/icons-react"Vertical Title#
Profile content
"use client"
import { IconCheck, IconLoader2 } from "@tabler/icons-react"Vertical Title & Description#
Profile content
"use client"
import { IconCheck, IconLoader2 } from "@tabler/icons-react"API Reference#
Stepper#
The root component that manages the active step and configuration.
| Prop | Type | Default | Description |
|---|---|---|---|
defaultValue | number | 1 | The step index to start with (uncontrolled). |
value | number | - | The current active step index (controlled). |
onValueChange | (value: number) => void | - | Callback fired when the active step changes. |
orientation | "horizontal" | "vertical" | "horizontal" | The layout direction of the stepper. |
variant | "default" | "info" | "success" | "warning" | "destructive" | "default" | The color variant shared by active and completed steps. default uses the primary color. |
activeVariant | "default" | "info" | "success" | "warning" | "destructive" | variant | Optional color override for the active step only. |
indicators | StepIndicators | - | Custom icons or elements for different step states. |
StepperNav#
A container for the stepper items, usually displayed as a progress bar or navigation trail.
StepperItem#
Represents a single step in the process.
| Prop | Type | Default | Description |
|---|---|---|---|
step | number | - | Required. The unique index of this step. |
completed | boolean | false | Manually mark the step as completed. |
disabled | boolean | false | Disable interactions for this step. |
loading | boolean | false | Show the loading indicator for this step. |
StepperTrigger#
The interactive element used to navigate between steps.
| Prop | Type | Default | Description |
|---|---|---|---|
render | ReactElement | - | Replace the rendered element, merging the trigger's props onto it. |
StepperIndicator#
Displays the status of the step, such as a number, checkmark, or custom icon.
The indicator color is controlled by the parent Stepper's variant and
optional activeVariant props.
StepperSeparator#
A visual line between steps.
StepperTitle#
The label for the step.
StepperDescription#
Additional supporting text for the step.
StepperPanel#
A container for step content panels.
StepperContent#
The actual content associated with a specific step.
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | - | Required. The step index this content belongs to. |
forceMount | boolean | false | Whether to keep the content in the DOM when not active. |
Types#
StepIndicators#
type StepIndicators = {
active?: React.ReactNode
completed?: React.ReactNode
inactive?: React.ReactNode
loading?: React.ReactNode
}StepperVariant#
type StepperVariant = "default" | "info" | "success" | "warning" | "destructive"On This Page
InstallationUsageExamplesStatesIndicatorsControlledProgressTitleTitle & BarTitle & StatusTitle & DescriptionInline TitleInline Title & DescriptionVerticalVertical TitleVertical Title & DescriptionAPI ReferenceStepperStepperNavStepperItemStepperTriggerStepperIndicatorStepperSeparatorStepperTitleStepperDescriptionStepperPanelStepperContentTypesStepIndicatorsStepperVariant