Process: numbered steps
An introduction beside an ordered sequence of numbered steps, with room for a short detail on each one.
pnpm dlx shadcn@latest add @haze/process-numbered-steps---
import { cn } from "../../../lib/haze/utils";
interface Props {
id?: string;
eyebrow?: string;
title?: string;
description?: string;
headingLevel?: 1 | 2 | 3;
steps?: { title: string; description: string; detail?: string }[];
class?: string;
}
const {
id = "process-numbered-steps",
eyebrow = "How it works",
title = "From a scattered idea to a shared plan",
description = "Give everyone the context they need, without adding another meeting to the calendar.",
headingLevel = 2,
steps = [
{ title: "Capture the work", description: "Bring requests, notes and decisions into one shared space.", detail: "Start with what you already have" },
{ title: "Make a plan together", description: "Set a clear owner and sequence the work around the outcome.", detail: "Keep the whole team in context" },
{ title: "Share progress as you go", description: "Publish concise updates from the work your team is already doing.", detail: "Keep stakeholders informed" },
],
class: className,
} = Astro.props;
const Heading = ({ 1: "h1", 2: "h2", 3: "h3" } as const)[headingLevel];
const StepHeading = ({ 1: "h2", 2: "h3", 3: "h4" } as const)[headingLevel];
---
<section aria-labelledby={`${id}-title`} class={cn("bg-background px-6 py-20 sm:py-24", className)}>
<div class="mx-auto grid max-w-6xl gap-10 lg:grid-cols-[minmax(0,0.8fr)_minmax(0,1fr)] lg:gap-24">
<div class="max-w-lg">
<p class="text-[0.6875rem]/4 font-medium tracking-wider text-muted-foreground uppercase">{eyebrow}</p>
<Heading id={`${id}-title`} class="mt-3 text-3xl/9 font-semibold tracking-tight text-balance text-foreground sm:text-4xl/11">{title}</Heading>
<p class="mt-4 text-base/7 text-pretty text-muted-foreground">{description}</p>
</div>
<ol class="divide-y divide-border border-y border-border">
{steps.map((step, index) => (
<li class="grid grid-cols-[2.5rem_minmax(0,1fr)] gap-4 py-6 sm:grid-cols-[3rem_minmax(0,1fr)] sm:gap-6 sm:py-8">
<span aria-hidden="true" class="flex size-10 items-center justify-center rounded-lg border border-frame bg-field font-mono text-[0.8125rem]/5 text-muted-foreground">{String(index + 1).padStart(2, "0")}</span>
<div class="min-w-0">
<StepHeading class="text-base/6 font-semibold tracking-tight text-foreground">{step.title}</StepHeading>
<p class="mt-2 text-sm/6 text-muted-foreground">{step.description}</p>
{step.detail && <p class="mt-3 text-[0.8125rem]/5 font-medium text-foreground">{step.detail}</p>}
</div>
</li>
))}
</ol>
</div>
</section>When to use
- Explaining a short sequence before someone starts
- The steps need a sentence of context rather than a progress control
When not to use
- Visitors need to navigate an active multi-step form rather than read an overview
Installation
Add the Haze registry to components.json once, then install Process: numbered steps with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.
pnpm dlx shadcn@latest add @haze/process-numbered-stepsnpx shadcn@latest add @haze/process-numbered-stepsyarn dlx shadcn@latest add @haze/process-numbered-stepsbunx --bun shadcn@latest add @haze/process-numbered-stepsFirst time? Registry and theme setup
1. Add to components.json:
{
"registries": {
"@haze": "http://localhost:4329/r/{name}.json"
}
}2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | "process-numbered-steps" | Section ID prefix; change it for each instance on a page. |
| eyebrow | string | "How it works" | Label above the heading. |
| title | string | demo heading | Section heading. |
| description | string | demo copy | Introductory paragraph. |
| headingLevel | 1 | 2 | 3 | 2 | Heading level; step headings use the next level. |
| steps | { title: string; description: string; detail?: string }[] | 3 demo steps | Steps in reading order, with an optional supporting detail. |
| class | string | – | Additional classes on the section. |
Accessibility
- Steps are an ordered list, so their sequence is available without the decorative numbers.
- Give repeated instances different id values to keep their section labels distinct.
Notes for AI
Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.
Install and use
Install the Haze UI block "Process: numbered steps" with `npx shadcn@latest add @haze/process-numbered-steps`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import ProcessNumberedSteps from "@/components/haze/blocks/process-numbered-steps.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/blocks/process-numbered-steps.md
Customize with real content
Adapt the Haze process-numbered-steps block for our product. Replace the demo values of these props with our real content: id, eyebrow, title, description, headingLevel, steps, class. Keep the layout, the heading level rules and these accessibility details: Steps are an ordered list, so their sequence is available without the decorative numbers. Give repeated instances different id values to keep their section labels distinct. Do not add raw color classes; use the Haze tokens.
Choose the right block
Before using process-numbered-steps, check it fits: use it when explaining a short sequence before someone starts; the steps need a sentence of context rather than a progress control. Avoid it when visitors need to navigate an active multi-step form rather than read an overview. Alternatives: @haze/features-icon-grid.
Dependencies
- @haze/utils
- @haze/theme (one-time setup)
Source · Original Haze UI work.