Faq

Frequently asked questions as an accordion, stacked or with the header beside the questions.

Status: beta. Category: Blocks.

import { Faq } from '@glyphui/blocks'

Exports: Faq.

Notes

  • One answer is open at a time by default. Set multiple to allow several.

Faq props

PropTypeDefaultDescription
items (required)readonly FaqItem[]
animatebooleantrueEntrance animations as the block scrolls into view. They follow the theme's motion level and the visitor's reduced-motion setting; false turns them off for this block. Default true.
descriptionReactNode
eyebrowReactNode
headingLevelHeadingLevel2
layout"stacked" | "split"stackedstacked (default) puts the header above; split puts it beside the questions on large screens.
multiplebooleanfalseAllow several answers open at once.
titleReactNode

Example: Stacked

import { Faq } from '@glyphui/blocks'

export default function Example() {
  return (
    <Faq
      title="Questions, answered"
      items={[
        {
          question: 'Can I import my existing customers?',
          answer:
            'Yes. Upload a CSV or connect Stripe and we import customers, plans and payment methods.',
        },
        {
          question: 'Do you charge per invoice?',
          answer: 'No. Plans are flat monthly prices; Starter includes 50 invoices a month.',
        },
        {
          question: 'Which currencies do you support?',
          answer: '135 currencies, with local payment methods in 46 countries.',
        },
      ]}
    />
  )
}

Example: Split layout

import { Faq } from '@glyphui/blocks'
import { Link } from '@glyphui/ui'

export default function Example() {
  return (
    <Faq
      layout="split"
      eyebrow="Support"
      title="Before you start"
      description={
        <>
          Can’t find what you need? <Link href="#contact">Talk to us</Link>.
        </>
      }
      multiple
      items={[
        {
          question: 'Is there a free trial?',
          answer: 'Growth comes with a 14-day trial. Starter is free forever.',
        },
        {
          question: 'Can I cancel anytime?',
          answer: 'Yes. You keep access until the end of the billing period.',
        },
        {
          question: 'Where is my data stored?',
          answer: 'In the EU or US, your choice, on SOC 2 audited infrastructure.',
        },
      ]}
    />
  )
}

Live page: https://glyphui.xyz/components/faq