Marketing sectionsSteps
Searchastronomic.dev# Steps
To build your own process layout: numbered steps, each with a title, an optional phase and a line. For a ready layout, use StepsColumns or StepsList.
Static: no JavaScript.
## Usage
```astro
import Steps from "@astronomic-dev/ui/components/Steps.astro";
```
## Examples
### Slots
The section is a shell: the eyebrow, the heading and the text always show in that order, then the ordered list of StepItems in the default slot. The shell sets the type and the gaps; the recipes lay out the list and each step. StepsColumns and StepsList are recipes built on it. childHeadingTag() in lib/heading.ts gives the steps' title level.
```astro
---
import Badge from "@astronomic-dev/ui/components/Badge.astro";
import StepItem from "@astronomic-dev/ui/components/StepItem.astro";
import Steps from "@astronomic-dev/ui/components/Steps.astro";
import { childHeadingTag } from "@astronomic-dev/ui/lib/heading.ts";
const heading = "How a project runs";
const steps = [
{ title: "Workshop", meta: "Week 1", text: "One day with your team. We agree on goals, audience and budget." },
{ title: "Build", meta: "Weeks 2–8", text: "Design and code in weekly rounds. You see real pages every Friday." },
{ title: "Launch", meta: "Week 9", text: "We launch, train your editors, and hand over every source file." },
];
// One level under the section heading: h2 gives h3.
const tag = childHeadingTag({ heading });
---
<div class="mx-auto max-w-6xl px-6 py-16">
<Steps heading={heading} text="Ten weeks or less, from the first call to the launch." listClass="@3xl/steps:grid-cols-3">
<Badge slot="eyebrow">Process</Badge>
{steps.map((s, i) => <StepItem number={i + 1} title={s.title} meta={s.meta} text={s.text} headingTag={tag} />)}
</Steps>
</div>
```
## Props
### Steps
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `heading` | `string` | None | The section heading, in the title role in display type. Without it there is no section and no header: a plain <div> holds only the list. |
| `emphasis` | `boolean` | `false` | Turn one *phrase* in the heading into <em>: exactly two asterisks around text with no space inside, as in "Built for *the long run*". Any other asterisks show as typed. Off by default, so the heading shows as typed. How the <em> looks is the theme's. |
| `mark` | `string` | None | A short mark after the heading, such as "(12)" or "©2026", in small muted type. It sits beside the heading, outside it, so the heading's name stays plain. Shown only with a heading. |
| `markLabel` | `string` | None | What the mark says to a screen reader, such as "12 projects": the mark is then hidden from screen readers and this is read in its place. Without it, the mark is read as written. |
| `text` | `string` | None | One or two sentences under the heading, in the lead role, muted. Shown only with a heading. |
| `headingTag` | `"h2" \| "h3" \| "h4"` | `"h2"` | The heading element. Step titles sit one level under it. |
| `align` | `"start" \| "center"` | `"start"` | For recipes. The alignment of the header (SectionHead) only: the recipe lays out the list. |
| `contentClass` | `string` | None | For recipes. Classes for the row that holds the header and the list. |
| `headerClass` | `string` | None | For recipes. Classes for the header (the eyebrow, the heading and the text). |
| `listClass` | `string` | None | For recipes. Classes for the list of steps (the <ol>), such as its columns. It sits inside the steps container, so its classes can query it (@3xl/steps:...). |
| `class` | `string` | None | More classes for the root (the <section>, or the <div> without a heading), merged with cn(), so yours win on conflicts. The root is a named size container (inline-size containment): in a shrink-to-fit parent (inline-flex, a float, fit-content) it collapses, so give it a width there. |
| Slot | Description |
| --- | --- |
| `eyebrow` | A short line above the heading, such as a Badge. Shown only with a heading. |
| `default` | The steps: one StepItem (an <li>) each, numbered from 1. |
Any other attribute goes on the <section>, or on the <div> without a heading.
## Accessibility
- With a heading, renders a <section> named by it, so it is a region landmark. The heading id is unique on the page.
- Without a heading, renders a plain <div>. Put your own heading above it.
- The steps are an ordered list, so a screen reader says the order: it hears "list, N items", then the steps in order. The numbers are hidden from it.
- Each step title sits one level under the section heading (h2 gives h3). With no heading, it is an h3 unless you set itemHeadingTag.
- With no steps the list is still there, empty: leave the section out when there are none.
Steps
FreeTo build your own process layout: numbered steps, each with a title, an optional phase and a line. For a ready layout, use StepsColumns or StepsList.
- File
- Steps.astro
- Group
- Marketing sections
- Kind
- Static: no JavaScript
- Examples
- 1
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
Slots
The section is a shell: the eyebrow, the heading and the text always show in that order, then the ordered list of StepItems in the default slot. The shell sets the type and the gaps; the recipes lay out the list and each step. StepsColumns and StepsList are recipes built on it. childHeadingTag() in lib/heading.ts gives the steps' title level.
This preview did not load.
main.astro
examples/steps/main.astro
---
import Badge from "@astronomic-dev/ui/components/Badge.astro";
import StepItem from "@astronomic-dev/ui/components/StepItem.astro";
import Steps from "@astronomic-dev/ui/components/Steps.astro";
import { childHeadingTag } from "@astronomic-dev/ui/lib/heading.ts";
const heading = "How a project runs";
const steps = [
{ title: "Workshop", meta: "Week 1", text: "One day with your team. We agree on goals, audience and budget." },
{ title: "Build", meta: "Weeks 2–8", text: "Design and code in weekly rounds. You see real pages every Friday." },
{ title: "Launch", meta: "Week 9", text: "We launch, train your editors, and hand over every source file." },
];
// One level under the section heading: h2 gives h3.
const tag = childHeadingTag({ heading });
---
<div class="mx-auto max-w-6xl px-6 py-16">
<Steps heading={heading} text="Ten weeks or less, from the first call to the launch." listClass="@3xl/steps:grid-cols-3">
<Badge slot="eyebrow">Process</Badge>
{steps.map((s, i) => <StepItem number={i + 1} title={s.title} meta={s.meta} text={s.text} headingTag={tag} />)}
</Steps>
</div>Minimal · Light