shadcn.io is not affiliated with official shadcn/ui
Onboarding FAQ Block for React
A first-hour plan as an FAQ for a team workspace: five accordion steps down a numbered rail, each with its duration, under a header that adds the minutes up.
Installation
Overview
An onboarding FAQ for React with Base UI. A start-aligned header carries a small badge that adds the steps' minutes up ("Ready in 25 min"), and five accordion steps follow under a rule with + marks. A hairline rail runs down the start side through a numbered circle for each step; the circle of the open step fills with your theme's foreground, every step carries its duration in a badge, and the answers are indented to sit under their question. The rows are hairlines that the rail crosses. One answer is open at a time. On a phone the rail stays and each duration drops under its question. The page's rails and top rule come from the Guides spine, so the block lines up with its neighbours in a stack. It's built from Accordion, Badge and Guides, with CSS transitions for the entrance and your theme's tokens for every colour. For onboarding pages and getting-started guides where the order of the steps matters as much as the answers.
FAQ
How do I change the steps and the total?
Edit STEPS at the top of the file: each entry is an id, the question, its answer and its minutes, a number. The badge in the header is TOTAL_MINUTES, added up from the same list, and each row's duration comes from its own entry, so the total can never disagree with the steps. OPEN_STEP names the step that's open on load.
How is the rail drawn?
Each step draws its own short hairline down its start side, with CSS: the first starts at its circle and the last stops at its own, so the rail never sticks out above or below. The circle sits on top of it with a solid background. Because the line belongs to the step, it grows with the step when an answer opens. The circle of the open step turns solid with the foreground colour, and the numbers are decoration: a screen reader hears "Step 2:" before each question instead.
Are the closed answers in the page's markup?
Yes. The Accordion takes hiddenUntilFound, so every closed answer stays in the markup as hidden="until-found" and the browser's find in page opens the one that holds a match.
How does it work with a keyboard and a screen reader?
Each step's title is a button inside its own h3 under the section's h2, so a screen reader's headings list shows all five, and the button says whether it's expanded. Enter or Space opens and closes one, and the duration is read as part of the button's name.
Tab moves from step to step.
Related
- Pro
Timeline FAQ
Steps and plansA version-history FAQ for a developer toolkit: six accordion rows down a hairline rail with a dot and a version for each release, the newest one ringed and badged.
- Pro
Checklist FAQ
Steps and plansA FAQ you tick off for a booking tool: a progress panel beside seven setup tasks, each a real checkbox with its answer, behind a split divider.
- Pro
Wizard FAQ
Steps and plansA FAQ that shows one question at a time for an analytics tool: a numbered step list, the active question and answer, and Previous and Next buttons in a card in card.
- Pro
Numbered FAQ
Accordion listsA numbered FAQ for a wine club: eight accordion rows from rail to rail, with a margin of tabular numerals, 01 to 08, behind a hairline; the open row's numeral turns to full strength.
- 123Pro
Centered Three-Step Process Hero
Updates and timelinesA compact centred how-it-works hero for an invoicing app: a headline, a Shine Button with an outline action and trust copy over a closing band of three step cells, each with a small drawing of its screen.
- Pro
Comparison FAQ
Steps and plansA tier-comparison FAQ for a form builder: column heads for Free, Pro and Enterprise over eight questions, each ending in three tick or dash marks and opening to the detail.