Installation
Usage
import { FaqSection } from "@/components/faq-section"
export default function Page() {
return <FaqSection />
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title / subtitle | string | "Questions, answered" / … | Heading and intro. |
| faqs | { question: string; answer: string }[] | 5 examples | The questions, in order. |
| contact | { text; label; href } | null | Contact us → /contact | A way out for unanswered questions; null hides it. |
| layout | "split" | "centered" | "split" | Heading beside the questions, or above them. |
| headingLevel | 1 | 2 | 2 | Section heading level; questions are one below. |
| structuredData | boolean | true | Add schema.org FAQPage JSON-LD. Google retired FAQ rich results in 2026; other search engines and AI assistants may still read it. |
| searchable | boolean | from 7 questions | A search box that narrows and highlights questions. |
| eyebrow | string | "FAQ" | Small label above the heading. |
Accessibility
- A labelled section; each question is a real heading one level below the section's.
- Answers open in an accessible accordion (aria-expanded, regions, arrow keys).
- The FAQPage data holds plain text and is escaped, so an answer can never inject markup.
- The search box is labelled and the number of matches is announced; with no match, the contact link is offered.
Changelog
- v1.0.0Latest
First release.