Setup Guide
Collapsible groups of steps, each with a one-line why, a button and Skip. Progress reads "4 of 6 · 1 skipped". A finished step draws its tick and strikes through, the next one opens, and the whole guide can fold into a small launcher or be dismissed once everything is done.
The decision inside it
Done comes from your app
A checklist people can tick themselves fills up with things that never happened. Here a step is done when your props say so. The person can skip a step instead, and a skip counts toward finishing but is always drawn as skipped, never as done.
When to use it
Use Setup Guide for a new account's onboarding checklist. Pass done from your own data, so a step is ticked only when the thing happened; people can Skip, which is shown as skipped. It can fold into a floating launcher.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Layro's Setup Guide for this.
Install it: npx shadcn@latest add @layro/setup-guide
(the @layro registry is set up in components.json, with LAYRO_KEY in .env.local)
Import it from @/components/ui/setup-guide.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @layro registry with your CLI token: see the Namespaced tab.
Usage
import { SetupGuide, type SetupStep } from "@/components/ui/setup-guide";
export function OnboardingChecklist({ user, go }: {
user: { emailVerified: boolean; hasSource: boolean; invited: boolean };
go: (id: string) => void;
}) {
const steps: SetupStep[] = [
{ id: "verify", group: "account", title: "Verify your email", why: "So invoices reach you.", actionLabel: "Resend link", done: user.emailVerified },
{ id: "source", group: "data", title: "Connect a source", why: "Your first sync starts here.", actionLabel: "Connect", done: user.hasSource },
{ id: "invite", group: "team", title: "Invite a teammate", actionLabel: "Invite", done: user.invited },
];
return (
<SetupGuide
steps={steps}
groups={[{ id: "account", title: "Account" }, { id: "data", title: "Data" }, { id: "team", title: "Team" }]}
onAction={go}
/>
);
}API reference
“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Prop | Type | Notes |
|---|---|---|
stepsrequired | SetupStep[] | — |
groups | SetupGroup[] | Order and titles of the groups. Steps without a group go in one list. |
title | React.ReactNode | The heading. Default "Set up your workspace". |
onAction | (id: string) => void | Promise<void> | May return a promise; the button shows it working and any error inline. |
skipped | string[] | Skipped step ids. Controlled when given. |
defaultSkipped | string[] | — |
onSkippedChange | (skipped: string[], changed: { id: string; skipped: boolean }) => void | Promise<void> | May return a promise; the list waits for it before it changes. |
docked | boolean | Folded into the launcher. Controlled when given. |
defaultDocked | boolean | — |
onDockedChange | (docked: boolean) => void | — |
onDismiss | () => void | Shown once everything is done or skipped. Leave out to hide Dismiss. |
floating | boolean | Fix the panel and the launcher to the bottom right of the screen. |
look | Look | Layered sets the steps on a card in a tray, the title and progress above. Flat is one card. |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLayro foundations, installed alongside it
layro-themebuttonStates
All of them are drawn by the component. None is left for you to design.
- Fresh account
- Half done
- Skipped step
- Action running
- Action failed
- Docked
- All done
Accessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances
Used in a screenAll screens
Lifetime access
Every component, and everything we ship next.
- All 232 components, source included
- Every template, and everything released after you buy
- shadcn CLI or download — React 18/19, Tailwind v4
- One payment. No subscription.