No-JS FAQ Accordion
Exclusive accordion behaviour from named <details> elements — no state, no hooks, no JavaScript, full keyboard support for free.
Every answer rendered and visible in a two-column description list — the FAQ shape for a marketing page, where collapsed text is text a search engine will not quote.
components/faq-grid.tsxnpx hoverlab add faq-grid
Or over MCP, from your editor's agent — no account needed.
Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.
Start a page with this section — add more, order them, and leave with the page source.
Short answers, all of them on the page.
Rendered live in your current theme — this is the same component whose source is below, not a screenshot of it.
/**
* <FaqGrid> — every answer open, in two columns, with nothing to click.
*
* The other two FAQ blocks collapse their answers, and for a support page
* that is right: someone hunting one specific answer wants the questions
* scannable and the rest out of the way.
*
* This one is for the opposite job. An FAQ section on a marketing page
* earns its place through long-tail search — "does X support SSO", "can I
* cancel Y" — and a collapsed answer is a worse candidate for the snippet
* a search engine lifts, because the text it would quote is the text a
* visitor arrives to find hidden. Rendering everything also means the
* section prints, translates and Cmd-Fs correctly, none of which a
* disclosure widget does.
*
* The cost is real and is the reason this is a separate block rather than
* a prop: five open answers are a wall of text. Keep it to answers of two
* or three sentences, and reach for <FaqAccordion> once they run longer or
* there are more than about eight.
*
* A description list, not a stack of divs. <dt>/<dd> is what a
* question-and-answer pair *is*, and it is what lets a screen reader move
* question to question. `columns` rather than a grid so pairs of uneven
* length pack by height instead of leaving a ragged row.
*/
import * as React from 'react'
export interface FaqGridItem {
question: string
answer: string
}
export interface FaqGridProps {
items?: FaqGridItem[]
heading?: string
subheading?: string
className?: string
}
const DEFAULT_ITEMS: FaqGridItem[] = [
{
question: 'Is there a free plan?',
answer:
'Yes, and it is not a trial. Browsing, customising and copying stay free permanently — what a paid licence buys is the right to ship the result commercially.',
},
{
question: 'Which frameworks are supported?',
answer:
'The effects are CSS-first and work anywhere that renders an element. The blocks, pages and templates are React and Tailwind.',
},
{
question: 'Do I need an account to copy code?',
answer:
'No. Every artifact is readable and copyable without signing in, and the public API needs no key.',
},
{
question: 'How do updates reach my project?',
answer:
'They do not, by design. Copied code is yours and nothing reaches back into your repository — you pull a newer version when you actually want one.',
},
{
question: 'Can I customise before copying?',
answer:
'Yes. Colours, timing and sizing are editable in the browser, and what you copy is what you configured.',
},
{
question: 'What about accessibility?',
answer:
'Components ship with real semantics and honour prefers-reduced-motion. Anything decorative that animates is gated so it does not run for visitors who have asked for less motion.',
},
]
export function FaqGrid({
items = DEFAULT_ITEMS,
heading = 'Common questions',
subheading = 'Short answers, all of them on the page.',
className = '',
}: FaqGridProps) {
return (
<section
className={`mx-auto w-full max-w-5xl px-4 py-16 sm:px-6 sm:py-24 ${className}`}
>
<div className="mx-auto mb-12 max-w-2xl text-center">
<h2 className="text-balance text-3xl font-bold tracking-tight sm:text-4xl">
{heading}
</h2>
{subheading ? (
<p className="mt-3 text-muted-foreground">{subheading}</p>
) : null}
</div>
<dl className="gap-x-10 sm:columns-2">
{items.map((item) => (
// The wrapper is what `break-inside` applies to — a <dt> and its
// <dd> are two elements, and without it a column boundary can
// fall between a question and its own answer.
<div key={item.question} className="mb-8 break-inside-avoid">
<dt className="font-semibold leading-snug">{item.question}</dt>
<dd className="mt-2 break-words text-sm leading-relaxed text-muted-foreground">
{item.answer}
</dd>
</div>
))}
</dl>
</section>
)
}
bg-card, text-muted-foreground) — it inherits your theme instead of overriding it.Drop it at components/faq-grid.tsx and import it where you need the section:
import { FaqGrid } from '@/components/faq-grid'2 of this block’s props are simple enough to drive from here. Change them and the block below re-renders — it is the same component whose source is above, not a mock of it. Everything else it accepts is in the table underneath.
Read out of the component’s own type and signature, so this cannot drift from the source below. Every prop has a default — the component renders standalone before you pass it anything.
| Prop | Type | Default |
|---|---|---|
items | FaqGridItem[] | DEFAULT_ITEMS |
heading | string | 'Common questions' |
subheading | string | 'Short answers, all of them on the page.' |
className | string | '' |
The same block rendered once to markup, wrapped as a file your framework compiles. Tailwind classes are framework-agnostic, so the design transfers intact — the behaviour does not.
<!--
Open FAQ Grid — markup from the Hoverlab catalog.
This is the block rendered once to HTML and wrapped as a component
file. It is not a port of the React source: the Tailwind classes carry
the design, which is the part that took the work, and they are the same
in every framework.
This block has no interactive behaviour, so nothing is missing.
-->
<section class="mx-auto w-full max-w-5xl px-4 py-16 sm:px-6 sm:py-24 ">
<div class="mx-auto mb-12 max-w-2xl text-center">
<h2 class="text-balance text-3xl font-bold tracking-tight sm:text-4xl">Common questions</h2>
<p class="mt-3 text-muted-foreground">Short answers, all of them on the page.</p>
</div>
<dl class="gap-x-10 sm:columns-2">
<div class="mb-8 break-inside-avoid">
<dt class="font-semibold leading-snug">Is there a free plan?</dt>
<dd class="mt-2 break-words text-sm leading-relaxed text-muted-foreground">Yes, and it is not a trial. Browsing, customising and copying stay free permanently — what a paid licence buys is the right to ship the result commercially.</dd>
</div>
<div class="mb-8 break-inside-avoid">
<dt class="font-semibold leading-snug">Which frameworks are supported?</dt>
<dd class="mt-2 break-words text-sm leading-relaxed text-muted-foreground">The effects are CSS-first and work anywhere that renders an element. The blocks, pages and templates are React and Tailwind.</dd>
</div>
<div class="mb-8 break-inside-avoid">
<dt class="font-semibold leading-snug">Do I need an account to copy code?</dt>
<dd class="mt-2 break-words text-sm leading-relaxed text-muted-foreground">No. Every artifact is readable and copyable without signing in, and the public API needs no key.</dd>
</div>
<div class="mb-8 break-inside-avoid">
<dt class="font-semibold leading-snug">How do updates reach my project?</dt>
<dd class="mt-2 break-words text-sm leading-relaxed text-muted-foreground">They do not, by design. Copied code is yours and nothing reaches back into your repository — you pull a newer version when you actually want one.</dd>
</div>
<div class="mb-8 break-inside-avoid">
<dt class="font-semibold leading-snug">Can I customise before copying?</dt>
<dd class="mt-2 break-words text-sm leading-relaxed text-muted-foreground">Yes. Colours, timing and sizing are editable in the browser, and what you copy is what you configured.</dd>
</div>
<div class="mb-8 break-inside-avoid">
<dt class="font-semibold leading-snug">What about accessibility?</dt>
<dd class="mt-2 break-words text-sm leading-relaxed text-muted-foreground">Components ship with real semantics and honour prefers-reduced-motion. Anything decorative that animates is gated so it does not run for visitors who have asked for less motion.</dd>
</div>
</dl>
</section>
What each framework gets across the whole catalog — effects convert properly; this rung is markup.
The component, its props, the design tokens it expects and the command that installs it — as one prompt. Paste it into Claude, Cursor, v0 or ChatGPT and what they build around it will match the rest of the catalog instead of inventing its own system.
Want the whole screen instead of this one section? Open a page and copy it entire.
All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.
Browse FAQCopying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.
Exclusive accordion behaviour from named <details> elements — no state, no hooks, no JavaScript, full keyboard support for free.
Questions on the right against a sticky rail that keeps a route to a human in view — for the visitor whose objection is not on the list.
Anchor-linked topic pills over per-topic details groups with the first answer open — for the FAQ that outgrew a single list, working with JavaScript disabled.
A search that narrows the list across answers and keywords, announces the count, and turns an empty result into the contact route it should always have been.
An FAQ written from the objections that stop a sale rather than from the questions that are comfortable to answer.
The security questions a buyer's IT reviewer asks, answered with scope and dates rather than with the word "enterprise-grade".