shadcn.io is not affiliated with official shadcn/ui
Docs Links FAQ Block for React
A FAQ for a mapping service where every answer ends in two guides from the docs, as links with a reading time and an arrow.
Installation
Overview
A FAQ that points into the docs, for React with Base UI. Six questions sit in hairline rows that run from rail to rail, each opened by a small square that fills in. An open answer is two columns on a desktop: the answer at the start and, behind a hairline at the end, "Read more in the docs" with two guides as real links, each with its length in minutes and an arrow. On a phone the guides stack under the answer. It's built from Accordion and Guides, with CSS transitions for the entrance and your theme's tokens for every colour. For API and product docs where a short answer is a doorway to a longer guide.
FAQ
Where do the guide links go?
Every guide is a real link with href="#": point each at its article. Edit the guides of each question in QUESTIONS: a title and the minutes it takes to read. The "4 min read" is typed, so keep it honest when an article changes.
What happens in right-to-left languages?
The two columns swap sides, the hairline between them moves with them, and the arrow at the end of each guide flips to point the other way. The minutes are wrapped so a number and its unit stay in order.
How do I add a question?
Add an entry to QUESTIONS with an id, the question, its answer and its guides. Two guides fit well; more make the list taller than the answer. OPEN_QUESTION names the one that's open on load.
One answer is open at a time.
How does it work with a keyboard and a screen reader?
Each question is a button inside its own h3. The open answer has an h4, "Read more in the docs", over a list of links, and each link is read as its title and its length. Tab moves from a question into its guides and on to the next question.
Related
- Pro
Related Questions FAQ
Reading and sharingA cross-linked FAQ for a password manager: every answer ends in two related questions, and choosing one opens that row, scrolls to it and moves focus to its question.
- 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
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.
- Pro
Table of Contents FAQ
NavigationA FAQ for an object-storage service with a sticky table of contents: three topics and their questions in an outline that follows the reader, beside topic bands that each hold an accordion.
- Pro
FAQ with Contact Card
Contact and signupAn FAQ beside a contact card for an energy supplier: seven questions in an accordion, and behind a split divider a sticky card in card with email, live chat status, phone hours and a Shine Button.
- Pro
Multi-Language FAQ
Reading and sharingAn FAQ in English, Spanish and Arabic for a relocation service: a language switcher swaps the title, questions and answers, and sets lang and dir so Arabic lays the block out from its end.