Component showcase

FAQ

Question and answer layouts. 2 variants, 2 rendered live.

center

faqin useOpen live
desktop preview
desktop 1280px
mobile preview
mobile 390px
Files
  • src/components/sections/Faq.astro
  • src/components/sections/faq/HelpCard.astro
  • src/scripts/sections/faq.ts
How to pin
{
  "variants": {
    "<section id>": "center"
  }
}

yes: theme.json variants[<section.id>]="center" (SectionList passes extras.variants as pinned). Not validated: a wrong id for the kind falls to the component default

Reads
faq | faq{title,items[{q,a}]}; consecutive question runs merged by lib/question-runs.ts
Used by
not tracked (layout is seeded per site)
Quality gates
22 codes

sections (about/services/stats/faq/testimonials): plain-section thin-card empty-cards empty-area layout-imbalance misaligned-columns short-text-columns text-wall text-fragment headline-is-paragraph heading-truncated duplicate-heading eyebrow-equals-title duplicate-section duplicate-title flattened-list orphan-numbering related-sections-apart placeholder-icon-tile card-no-art empty-art-panel repeated-image

Selected by
planLayout (components/variants.ts): optionsFor(section) eligibility; a family cycles through unused layouts first; pick(seed, kind:index). Precedence: theme.json variants[sectionId] (facts.pinned, NOT validated against eligibility) > effect registry forced variants (only if eligible) > seeded

split

faqin useOpen live
desktop preview
desktop 1280px
mobile preview
mobile 390px
Files
  • src/components/sections/Faq.astro
  • src/components/sections/faq/HelpCard.astro
  • src/scripts/sections/faq.ts
How to pin
{
  "variants": {
    "<section id>": "split"
  }
}

yes: theme.json variants[<section.id>]="split" (SectionList passes extras.variants as pinned). Not validated: a wrong id for the kind falls to the component default

Reads
faq | faq{title,items[{q,a}]}; consecutive question runs merged by lib/question-runs.ts
Used by
not tracked (layout is seeded per site)
Quality gates
22 codes

sections (about/services/stats/faq/testimonials): plain-section thin-card empty-cards empty-area layout-imbalance misaligned-columns short-text-columns text-wall text-fragment headline-is-paragraph heading-truncated duplicate-heading eyebrow-equals-title duplicate-section duplicate-title flattened-list orphan-numbering related-sections-apart placeholder-icon-tile card-no-art empty-art-panel repeated-image

Selected by
planLayout (components/variants.ts): optionsFor(section) eligibility; a family cycles through unused layouts first; pick(seed, kind:index). Precedence: theme.json variants[sectionId] (facts.pinned, NOT validated against eligibility) > effect registry forced variants (only if eligible) > seeded
Notes
needs title; side heading column