shadcn.io is not affiliated with official shadcn/ui
Breadcrumb FAQ Block for React
A drill-down help centre for a mobile carrier: four topic cells in a framed card, a breadcrumb bar, and each topic's questions behind a click.
Installation
Overview
A drill-down FAQ for React with Base UI. Under a compact header, a framed card holds a breadcrumb bar and a body that starts as four topic cells on shared hairlines (an icon, the name and its question count). Choosing a cell swaps the body for that topic's questions in an accordion, the breadcrumb reads "Help centre / Billing", and focus lands on the topic's heading; the first crumb takes you back and returns focus to the cell you came from. The body keeps one height on both levels, so the page doesn't move. It's built from Breadcrumb, Accordion, Guides and your theme's tokens. For help centres whose topics are broad enough to deserve a level of their own.
FAQ
How do I change the topics?
Edit TOPICS at the top of the file: each topic has an id, an icon (any lucide icon), a label and its questions. The cell shows the count from that list. Two to six topics fit the card; four fill a two-by-two grid exactly.
Where does focus go when I drill in and back?
Choosing a cell moves focus to the topic's heading (it takes focus without being a tab stop), so a screen reader announces where you are and the next Tab reaches the first question. Going back through the first crumb puts focus on the cell you opened, so you can open the next one with a key press. Nothing takes focus when the page loads.
How does the breadcrumb work?
It's a navigation landmark named "Help centre" with the current level marked as the current page.
The first crumb is a link (href="#help-centre") that returns to the cells and stops the jump; point it at a route if the levels have their own addresses.
Are the other topics' answers in the page's markup?
Yes: every topic's questions are rendered, and the levels you aren't looking at are hidden with the hidden attribute. Closed answers:
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.
Related
- Pro
Categorized FAQ
Topics and filtersA topic-tabbed FAQ for a bookkeeping app: a compact header, a band of line tabs with a count on each, and one accordion per topic.
- Pro
Mega Help Index FAQ
Cards and gridsA help-index FAQ for a DIY store: sixteen questions in four topic columns on shared hairlines, with the chosen answer in a framed reading panel above them.
- Pro
Collapsible Sidebar FAQ
NavigationA sidebar FAQ for a holiday-rental site: a topic rail with two collapsible groups and a live count, beside a filtered list, and a native select on phones.
- Pro
Expandable Sections FAQ
Accordion listsA two-level FAQ for a photo-book shop: an accordion of three sections whose panels each hold an accordion of questions, with a summary of how many of each.
- Pro
Card Grid FAQ
Cards and gridsA static FAQ grid for a seed shop: six questions with their answers on show, in cells that share hairlines, each with an icon tile and a topic tag.
- Pro
Split View FAQ
NavigationA master-detail FAQ for a sales CRM: a list of eight questions at the start and the chosen answer in a framed panel at the end, with a Next question button.