Steps
Numbered how-it-works steps as an ordered list.
Preview
The line connecting the steps draws across as you scroll them into view. With reduced motion turned on, it renders the plain layout.
How it works
- Step 1:
Pick a section
Browse previews in your colors.
- Step 2:
Run one command
The shadcn CLI copies the code into your project.
- Step 3:
Make it yours
Edit it like any other file, then ship.
How it works
- Step 1:
Pick a section
Browse previews in your colors.
- Step 2:
Run one command
The shadcn CLI copies the code into your project.
- Step 3:
Make it yours
Edit it like any other file, then ship.
Installation
Run this in a project that already uses shadcn/ui. It adds the component and anything it needs; the motion version also adds the plain one and the motion package.
Usage
import { Steps } from "@/components/custom/steps";
<Steps
title="How it works"
steps={[{ title: "Pick a section", description: "…" }, { title: "Run one command", description: "…" }]}
/>import { StepsMotion } from "@/components/custom/steps/steps-motion";
<StepsMotion steps={steps} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| steps* (required) | { title; description }[] | – | In order; 3 or 4 read best. |
| title / description | string | – | Heading (h2) and line under it. |
| ...props | React.ComponentProps<"section"> | – | Any other section attribute (id, aria-*, data-*, ref) goes to the root element. |
| Prop | Type | Default | Description |
|---|---|---|---|
| steps* (required) | { title; description }[] | – | In order; 3 or 4 read best. |
| title / description | string | – | Heading (h2) and line under it. |
| ...props | React.ComponentProps<"section"> | – | Any other section attribute (id, aria-*, data-*, ref) goes to the root element. |
Accessibility
- An ordered list; each step is announced as “Step N”.
- The motion version follows the visitor's reduced-motion setting and never hides content before it animates.