shadcn.io is not affiliated with official shadcn/ui
Images FAQ Block for React
A photo-gallery FAQ whose open answers split into words and a framed greyscale drawing of the screen they describe: a share dialog, backup settings, an export menu, a search, an album picker and the trash.
Installation
Overview
An FAQ for React with Base UI where each answer shows the screen it talks about. A centred header sits over a band of six questions that run from rail to rail under a rule with + marks, their text held to a 56rem column. From the md breakpoint an open answer splits in two: the words at the start, and at the end a drawing of the screen in a frame with corner marks. The drawings are greyscale UI built in CSS, with a sun-and-ridge pattern standing in for photos, and use only your theme's tokens, so they look right in every preset, light or dark. On a phone the drawing sits under the words. It's built from Accordion and Guides. For apps and products whose questions are easiest to answer by pointing at a screen.
FAQ
Are the drawings images or code?
Code: each is a small component of spans, borders and a few SVG shapes, so it scales sharply, follows the theme and adds no image to download. The photo thumbnails are a sun and a ridge drawn in SVG with currentColor, three shapes that repeat. To show your own screens, swap a drawing component for your own markup or an img with a text alternative.
What do screen readers hear for the drawings?
Nothing: each drawing is hidden from assistive technology and inert, so its mock buttons and switches can't be focused or pressed. The answer's words say everything the screen shows, which is the rule for a decorative illustration. If you swap in a screenshot that carries information the words don't, give it a real alt.
How do I add a question with its own drawing?
Add an entry to QUESTIONS, write a drawing component beside the others, and add one line to the Canvas in the answer that shows it when the question's id matches. Reuse the small parts, Photo and the mock switch, to keep the set consistent.
Are the closed answers in the page's markup?
Yes. The Accordion takes hiddenUntilFound, so closed answers stay in the markup as hidden="until-found" and the browser's find in page opens the one that holds a match.
Related
- Pro
Diagram FAQ
Code and mediaA centred identity-service FAQ whose first answer carries a sequence diagram with three lifelines and four numbered arrows, driven by a list of steps you can hover, focus or press.
- Pro
Video Walkthrough FAQ
Code and mediaA deploy-platform FAQ in one framed card: three answers carry a walkthrough with a UI-drawn poster, a duration badge, a link to the real video and a list of timecoded chapter links.
- Pro
Icons FAQ
Accordion listsA cleaning-service FAQ built to be scanned: an icon tile on each question and three short answer lines led by a check, a clock and a shield.
- 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
Bento Grid Features
BentosA bento of five features for an issue tracker, each cell drawn as the product at work: a live board with teammates' cursors, a pull request, a burndown, a triage rule and a typed SDK, in cells that share their hairlines.
- Pro
API Error Codes FAQ
Code and mediaAn error-code FAQ for a geocoding API: seven status codes as accordion rows with a mono chip, a cause, a fix, the header to look for and a retry verdict, beside a retry-rules note.