Components
How It Works Section
Numbered steps that explain a workflow end to end.
Installation
$ npx veil-ui@latest add how-it-works-sectionUsage
import { HowItWorksSection } from "@/components/ui/how-it-works-section";
<HowItWorksSection
title="How it works"
steps={[
{ title: "Install the CLI", description: "Set up tokens and utils." },
{ title: "Add components", description: "Source lands in your repo." },
]}
/>;Examples
Basic
How it works
Three steps from an empty project to a composed page.
- 1
Install the CLI
Run the initializer to set up tokens and utils.
- 2
Add components
Pick from the registry; source lands in your repo.
- 3
Compose pages
Assemble sections with shared spacing and theming.
Icons
Set up in minutes
- 1
Choose
Browse the catalog.
- 2
Copy
Add the component.
- 3
Ship
Deploy with confidence.
API reference
The package exports how-it-works-section along with its composable parts. It forwards standard attributes to its root element; see the examples above for the component-specific props.
Accessibility
- Pages keep a single
h1in the hero and useh2/h3for section hierarchy. - Call-to-action elements are real links or buttons with discernible labels.
- Decorative icons are
aria-hiddenand meaningful images requirealttext.
Vue and plain HTML
This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add how-it-works-section --framework vue or switch the framework in components.json.
<template>
<div data-slot="how-it-works-section" class="text-center w-full max-w-5xl"><h2 class="text-2xl font-semibold tracking-tight">How it works</h2><p class="mx-auto mt-2 max-w-xl text-sm text-muted-foreground">Three steps from an empty project to a composed page.</p><ol class="mx-auto mt-10 grid max-w-5xl gap-8 sm:grid-cols-3"><li class="relative flex flex-col items-center"><span class="flex size-12 items-center justify-center rounded-full border bg-background text-sm font-semibold shadow-xs [&_svg]:size-5 [&_svg]:text-primary">1</span><h3 class="mt-4 text-sm font-semibold">Install the CLI</h3><p class="mt-1 text-sm text-muted-foreground">Run the initializer to set up tokens and utils.</p><span aria-hidden="true" class="absolute left-[calc(50%+2.5rem)] top-6 hidden h-px w-[calc(100%-5rem)] bg-border sm:block"></span></li><li class="relative flex flex-col items-center"><span class="flex size-12 items-center justify-center rounded-full border bg-background text-sm font-semibold shadow-xs [&_svg]:size-5 [&_svg]:text-primary">2</span><h3 class="mt-4 text-sm font-semibold">Add components</h3><p class="mt-1 text-sm text-muted-foreground">Pick from the registry; source lands in your repo.</p><span aria-hidden="true" class="absolute left-[calc(50%+2.5rem)] top-6 hidden h-px w-[calc(100%-5rem)] bg-border sm:block"></span></li><li class="relative flex flex-col items-center"><span class="flex size-12 items-center justify-center rounded-full border bg-background text-sm font-semibold shadow-xs [&_svg]:size-5 [&_svg]:text-primary">3</span><h3 class="mt-4 text-sm font-semibold">Compose pages</h3><p class="mt-1 text-sm text-muted-foreground">Assemble sections with shared spacing and theming.</p></li></ol></div>
</template>