Components
FAQ block
Searchable questions with one answer open at a time, each linking to the exact doc, and a way to ask when nothing matches.
pnpm dlx shadcn@latest add @caliper/faq-blockWhen to use
Use it for
- Before the call to action, to answer the last objections.
- Support keeps answering the same questions.
Skip it when
- Content that belongs in the main page.
- Over fifteen questions; link to the help centre.
Installation
pnpm dlx shadcn@latest add @caliper/faq-block
Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. No account needed. The first part also adds Caliper UI’s tokens; import them once as in Installation.
Usage
This is the code behind the preview above.
import { type ReactNode } from "react" import { FaqBlock } from "@/components/ui/faq-block" function Frame({ children }: { children: ReactNode }) { return <div className="w-full overflow-hidden rounded-overlay border border-border shadow-resting">{children}</div>; } const faqs: Parameters<typeof FaqBlock>[0] = { eyebrow: "FAQ", title: "Questions finance teams ask", lead: "Straight answers, each linked to the page that explains it in full.", ask: { label: "Ask us about it", href: "mailto:help@halden.app" }, items: [ { question: "Does Halden replace our accountant?", answer: "No. It prepares the close; your accountant reviews it and signs off, usually faster.", doc: { label: "How review works", href: "#" } }, { question: "Which banks and ledgers connect?", answer: "11,000 banks through Plaid, plus Xero, QuickBooks and NetSuite in both directions.", doc: { label: "Connections", href: "#" } }, { question: "What if a match is wrong?", answer: "Undo it in one click. Halden learns from the correction for that vendor.", doc: { label: "Corrections", href: "#" } }, { question: "Is our data used to train models?", answer: "Never. Your data is processed in eu-central-1 and deleted 30 days after you leave.", doc: { label: "Data processing terms", href: "#" } }, ] }; export function FaqBlockDemo() { return <Frame><FaqBlock {...faqs} /></Frame>; }
API reference
FaqBlock
component
Accessibility
It exposes status semantics, with aria-hidden, aria-label, aria-live, aria-expanded and aria-controls kept in step with state. Changes that matter are announced through a live region.
No custom key handling; Tab and the native activation keys do the work.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.
Related
- Contact sectionA contact form beside the ways to reach a team.
- Footer blockThe page's last word: link columns, a newsletter that confirms in place, the legal line, status and the name as a full-width wordmark.
- CTA blockThe closing call to action: the promise again, one specific next step and a reassurance line.