Steps
Steps and Step: an ordered list with numbered markers, a title, a description and any content per step, side by side on wide containers and stacked on narrow ones.
Example
Add the registry
One line in components.json.
components.jsonCopy codeDeclare the layer
First line of your stylesheet.
app.cssCopy codeAdd components
Dependencies come along.
TerminalCopy code
steps-demo.tsxCopy code
Installation
Copy code
Usage
ImportCopy code
Numbered instructions: Step takes a title, a description and children, like a CodeBlock.
API reference
Steps
| Prop | Type | Default |
|---|---|---|
orientation`auto` lays the steps side by side on a wide container (48rem and up) and stacks them below. | "auto" | "vertical" | "horizontal" | "auto" |
Also takes <ol> attributes.
Step
| Prop | Type | Default |
|---|---|---|
titlerequired | ReactNode | – |
description | ReactNode | – |
headingLevel | 2 | 3 | 4 | 3 |
childrenAnything that belongs to the step, like a CodeBlock; it fills the remaining height. | ReactNode | – |
Also takes <li> attributes except title.
Other exports
type StepPropstype StepsPropsAccessibility
- An ordered list, so the count comes from the list; the visual numbers are hidden from screen readers.
Agent actions
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.