FAQ Accordion

Expandable FAQ list used on the home, contact, and FAQ pages. Single-item expansion with spring animations; HTML answers support inline links, styled with the site's prose-link treatment — foreground text over a subtle border-coloured underline.

Live Preview

Props

PropTypeDefaultDescription
faqs*FAQ[]-Array of FAQ items from Sanity. Each needs `_id`, `question`, and `answer` (HTML string). `answer` is rendered via dangerouslySetInnerHTML so links can be embedded.

Data from Sanity

tsx
// Sanity schema type
interface FAQ {
  _id: string
  question: string
  answer: string   // HTML string — inline <a> links get the prose-link style
  category?: string
  order?: number
}

Import

tsx
import { FAQAccordion } from '@/components/ui/FAQAccordion'