c-stepper-5.tsx
"use client"
import {
Stepper,
StepperContent,
StepperIndicator,
StepperItem,
StepperNav,
StepperPanel,
StepperSeparator,
StepperTitle,
StepperTrigger,
} from "@/components/reui/stepper"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
const steps = [{ title: "Step 1" }, { title: "Step 2" }, { title: "Step 3" }]
export function Pattern() {
return (
<Stepper
className="w-full max-w-md space-y-8"
defaultValue={2}
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 flex-1 items-start"
>
<StepperTrigger className="flex flex-col gap-2.5">
<StepperIndicator>{index + 1}</StepperIndicator>
<StepperTitle>{step.title}</StepperTitle>
</StepperTrigger>
{steps.length > index + 1 && (
<StepperSeparator className="group-data-[state=completed]/step:bg-primary absolute inset-x-0 top-3 left-[calc(50%+0.875rem)] m-0 group-data-[orientation=horizontal]/stepper-nav:w-[calc(100%-2rem+0.225rem)] group-data-[orientation=horizontal]/stepper-nav:flex-none" />
)}
</StepperItem>
))}
</StepperNav>
<StepperPanel className="text-sm">
{steps.map((step, index) => (
<StepperContent
key={index}
value={index + 1}
className="flex items-center justify-center"
>
Step {step.title} content
</StepperContent>
))}
</StepperPanel>
</Stepper>
)
}




























