shadcn.io is not affiliated with official shadcn/ui
Spec Sheet FAQ Block for React
A FAQ for a co-op survival game: a platform picker swaps a framed spec card of minimum and recommended specs, beside six questions about modes, crossplay and refunds.
Installation
Overview
A spec-sheet FAQ for React with Base UI. The start column holds the title, one sentence, a picker with three platforms (PC, Handheld, Console) and a framed card that lists four specs in two columns, Minimum and Recommended; choosing a platform swaps the card's rows without changing its height. The end column holds six questions in an accordion behind a split divider, each opened by a boxed chevron, and a contact line closes the start column. On a phone the parts stack: header, picker, specs, questions, contact. The rails and top rule come from the Guides spine, so the block lines up with its neighbours. It's built from Toggle, Data List, Accordion, Guides and Button, with CSS transitions for the entrance and your theme's tokens for every colour. For game and app pages where "will it run?" is the first thing a visitor asks.
FAQ
How do I change the specs and platforms?
Edit PLATFORMS at the top of the file: each platform has an id, a label and four specs, each with a label, a min and a rec value. Keep every platform to the same number of rows, so switching never changes the card's height. Add a platform by adding an entry and an icon in PlatformIcon. The questions are in QUESTIONS, and OPEN_QUESTION names the one that's open on load.
How does the platform picker work?
Each platform is a toggle button that's pressed while it's the one on, and pressing the one that's already on keeps it. The three sit in a fieldset named "Platform", so a screen reader announces the group, and Tab moves between them. The card's caption ("Hollowmere on PC") is a polite live region, so a screen reader hears the change, and each value is read with its column ("Minimum: 8 GB").
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 question is a button inside its own h3 under the section's h2. Enter or Space opens and closes one, and the button says whether it's expanded.
Tab moves from question to question; this accordion doesn't add arrow keys.
How does it fit on a phone?
Below the lg breakpoint the column stacks and the card is as wide as the screen. The platform icons drop out so the three chips fit on one line, the spec values fit on one line each down to 360 pixels, and below that every row reserves room for two lines, so switching platform never moves the page. The questions follow the card, under a rule with + marks.
Related
- Pro
Status FAQ
Proof and freshnessAn FAQ for a hosting platform where each question belongs to a service and shows that service's state, with a summary counted from the rows.
- Pro
Tabbed Vertical FAQ
NavigationA vertical-tabs FAQ for a transit app: a rail of five topics with an icon and a count each, beside the open topic's accordion, behind a split divider.
- Pro
Accordion FAQ
Accordion listsA side-header FAQ for a web analytics tool: the title, one sentence and a contact prompt beside seven questions in an accordion, behind a split divider.
- Pro
Code Snippet FAQ
Code and mediaAn SDK FAQ for a webhook service: five questions whose answers are code windows with curl, Node and Python tabs and a copy button, in a band of hairline rows.
- 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.
- Pro
Procurement Pack FAQ
Calculators and toolsA FAQ for a data platform with a procurement pack beside the questions: three documents as checkboxes with a live count, an email field and one Shine Button that requests what is ticked.