shadcn.io is not affiliated with official shadcn/ui
Dual Column Accordion FAQ Block for Solid
A two-column FAQ for a pottery studio: a start-aligned header, then two independent accordions of four questions side by side, behind a split divider.
Installation
Overview
A two-column accordion FAQ for Solid with Ark UI. A start-aligned title and sentence, with a ghost link to the class dates at their end, sit above a band that holds two separate accordions, four questions each, behind a split divider that meets the band's rule with a + mark. Each list is its own accordion, so opening a question in one never moves the other, and each column grows from its top. Hairline rows divide the questions and a chevron turns over on the open one. On a phone the first list is followed by the second, with a ruled break between them. 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, Guides and Button, with CSS transitions for the entrance and your theme's tokens for every colour. For product pages and help pages where eight questions fall into two natural groups.
FAQ
How do I change the questions?
Edit CLASSES and STUDIO at the top of the file: each entry is an id, the question and its answer, one to three sentences. OPEN_CLASSES and OPEN_STUDIO name the question open in each list on load; set one to an id that doesn't exist to start with that list closed. Keep each list to about four: past that, a column gets long next to its neighbour. Each list opens one answer at a time.
Add multiple to the Accordion to let several stay open.
Are the closed answers in the page's markup?
Yes. Each Accordion takes lazyMount={false} and unmountOnExit={false}, so every answer renders from the start, hidden until its question opens. Search engines and server rendering see all 8, and closing an answer doesn't remove it.
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, so a screen reader's headings list shows every question. Tab moves from question to question, Enter or Space opens and closes one, and the button says whether it's expanded. The open answer is labelled by its question. Tab then continues into the second list.
The Up and Down arrows also move between questions, and Home and End jump to the first and last.
Where does the link go?
It is a ghost button with an arrow (href="#"): point See class dates at your schedule. The block has no other button, and the Shine Button is left for a page's one main action.
The button's asChild receives its props: spread them onto your router's link.