
Stepper with vertical orientation and descriptions
@reui
c-stepper-13.tsx
"use client"
import {
Stepper,
StepperContent,
StepperDescription,
StepperIndicator,
StepperItem,
StepperNav,
StepperPanel,
StepperSeparator,
StepperTitle,
StepperTrigger,
} from "@/components/reui/stepper"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
const steps = [
{ title: "Account", description: "Create your account" },
{ title: "Profile", description: "Set up your profile" },
{ title: "Review", description: "Confirm your details" },
]
export function Pattern() {
return (
<div className="flex items-center justify-center">
<Stepper
className="flex flex-col items-center justify-center gap-10"
defaultValue={2}
orientation="vertical"
indicators={{
completed: (
<IconPlaceholder
lucide="CheckIcon"
tabler="IconCheck"
hugeicons="Tick02Icon"
phosphor="CheckIcon"
remixicon="RiCheckLine"
className="size-3.5"
/>
),
loading: (
<IconPlaceholder
lucide="LoaderCircleIcon"
tabler="IconLoader2"
hugeicons="Loading02Icon"
phosphor="CircleNotchIcon"
remixicon="RiLoader4Line"
className="size-3.5 animate-spin"
/>
),
}}
>
<StepperNav>
{steps.map((step, index) => (
<StepperItem
key={index}
step={index + 1}
className="relative items-start not-last:flex-1"
>
<StepperTrigger className="items-start gap-2.5 pb-12 last:pb-0">
<StepperIndicator className="data-[state=completed]:bg-success data-[state=completed]:text-white">
{index + 1}
</StepperIndicator>
<div className="mt-0.5 text-left">
<StepperTitle>{step.title}</StepperTitle>
<StepperDescription>{step.description}</StepperDescription>
</div>
</StepperTrigger>
{index < steps.length - 1 && (
<StepperSeparator className="group-data-[state=completed]/step:bg-success absolute inset-y-0 top-7 left-3 -order-1 m-0 -translate-x-1/2 group-data-[orientation=vertical]/stepper-nav:h-[calc(100%-2rem)]" />
)}
</StepperItem>
))}
</StepperNav>
<StepperPanel className="w-56 text-center text-sm">
{steps.map((step, index) => (
<StepperContent key={index} value={index + 1}>
{step.title} content
</StepperContent>
))}
</StepperPanel>
</Stepper>
</div>
)
}



























