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 accent color.

Live Preview

What services do you offer?
Do you take on freelance engagements?
Where are you based?

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 render with accent color
  category?: string
  order?: number
}

Import

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