Components
npx shadcn@latest add https://21st.dev/r/originui/stepperLoading preview...
import {
Stepper,
StepperDescription,
StepperIndicator,
StepperItem,
StepperSeparator,
StepperTitle,
StepperTrigger,
} from "@/components/ui/stepper";
const steps = [
{
step: 1,
title: "Step One",
description: "Desc for step one",
},
{
step: 2,
title: "Step Two",
description: "Desc for step two",
},
{
step: 3,
title: "Step Three",
description: "Desc for step three",
},
];
function Component() {
return (
<div className="space-y-8 text-center w-full max-w-[700px] min-w-[550px]">
<Stepper defaultValue={2}>
{steps.map(({ step, title, description }) => (
<StepperItem
key={step}
step={step}
className="max-md:items-start [&:not(:last-child)]:flex-1"
>
<StepperTrigger className="gap-4 max-md:flex-col">
<StepperIndicator />
<div className="text-center md:-order-1 md:text-left">
<StepperTitle>{title}</StepperTitle>
<StepperDescription className="max-sm:hidden">{description}</StepperDescription>
</div>
</StepperTrigger>
{step < steps.length && <StepperSeparator className="max-md:mt-3.5 md:mx-4" />}
</StepperItem>
))}
</Stepper>
<p className="mt-2 text-xs text-muted-foreground" role="region" aria-live="polite">
Stepper with inline titles and descriptions
</p>
</div>
);
}
export { Component };
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...