File: src/blocks/faq/FAQ02.astro
Accordion FAQ. Same item source as FAQ 01 (aeo.faq), with icon style and initial open-state controls.
Config (blocks.ts + integrations.ts)
Heading/layout from blocks.ts → faq02. Items default from integrations.ts → aeo.faq.
// blocks.ts
faq02: {
width: "narrow",
heading: "Frequently asked questions",
subheading: "Tap a question to reveal the answer.",
iconStyle: "chevron",
initialState: "first-open",
},
// integrations.ts — shared with FAQ01 / JSON-LD
aeo: {
faq: [
{ question: "How do we start?", answer: "Book a call and share your brief." },
],
},
Add to a page
---
import FAQ02 from "@/blocks/faq/FAQ02.astro";
---
<FAQ02 />
Props override matching keys from config:
<FAQ02
iconStyle="plus-minus"
initialState="closed"
heading="Common questions"
/>
Props
| Prop | Config key | Type / values | Default / notes |
|---|---|---|---|
sectionId |
— |
string |
Default "faq"; DOM id for the section; not in config |
width |
faq02.width |
standard | narrow | wide |
Wrapper max-width |
heading |
faq02.heading |
string |
— |
subheading |
faq02.subheading |
string |
— |
items |
aeo.faq |
{ question: string, answer: string }[] |
Override shared FAQ content for this instance |
iconStyle |
faq02.iconStyle |
chevron | plus-minus |
Accordion toggle icon style |
initialState |
faq02.initialState |
closed | open | first-open |
Which accordion panels start open |
