Skip to content

Pill accordion

FAQ with question cards that lift when opened.

Usage

Usage
import { FaqSection } from '@/components/blocks/faq-01'


<FaqSection />


// Swap in your own content
<FaqSection
  title="Questions, answered"
  type="multiple"
  defaultOpen={[0, 1]}
  items={[
    { question: 'Is there a free plan?', answer: 'Yes, free forever for small teams.' },
    { question: 'Can I cancel anytime?', answer: 'Of course, straight from billing settings.' },
  ]}
  contactHref="/contact"
/>

Install

pnpm dlx shadcn@latest add @pastaui-pro/faq-01

Source

Props

Pill accordion props
PropTypeDefaultDescription
eyebrowstring= 'Good to know'Small label above the heading. Pass an empty string to hide it.
titlestring= 'Answers before you ask'Section heading.
descriptionstring= Plans, billing and setup copySupporting line under the heading. Pass an empty string to hide it.
itemsFaqItem[]= Six SaaS questionsQuestion and answer pairs. Answers accept any ReactNode.
type'single' | 'multiple'= 'single'Whether opening a question closes the others.
defaultOpennumber | number[]= 0Index or indexes of the questions open on first render.
contactTextstring= 'Can’t find what you’re after?'Text beside the contact button.
contactLabelstring= 'Ask a real person'Contact button label. Pass an empty string to hide the contact row.
contactHrefstring= 'mailto:hello@example.com'Where the contact button links to.
classNamestring= —Additional classes for the section.