Skip to content

Grid cards

FAQ with two columns of question cards.

Usage

Usage
import { FaqGrid } from '@/components/blocks/faq-05'


<FaqGrid />


// Your own copy, several answers open at once, in a single column
<FaqGrid
  title={'Still curious?\nAsk away.'}
  type="multiple"
  columns={1}
  defaultOpen={[0]}
  items={[
    { question: 'Is there a free trial?', answer: 'Every plan starts with 14 days free.' },
    { question: 'Can I change plans later?', answer: 'Upgrade or downgrade any time.' },
  ]}
  ctaLabel="Book a demo"
  ctaHref="/contact"
/>

Install

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

Source

Props

Grid cards props
PropTypeDefaultDescription
eyebrowstring= ''Optional small label above the heading.
titlestring= 'Questions before you ship?\nWe have you covered.'Section heading. Use \n to break it onto a new line.
descriptionstring= ''Optional supporting line under the heading.
itemsFaqGridItem[]= Eight component-library questionsQuestion and answer pairs. Answers accept any ReactNode. With two columns, the first half fills the left column and the rest the right.
type'single' | 'multiple'= 'single'Whether opening a question closes the others.
columns1 | 2= 2Columns from the md breakpoint up. Always one column on small screens.
defaultOpennumber | number[]= 4 for the default items, otherwise noneIndex or indexes of the questions open on first render.
opennumber[]= —Controlled indexes of the open questions.
onOpenChange(open: number[]) => void= —Called with the next open indexes when a question is toggled.
ctaLabelstring= 'Talk to our team'Button label. Pass an empty string to hide the button.
ctaHrefstring= 'mailto:hello@example.com'Where the button links to.
classNamestring= —Additional classes for the section. Other section props are forwarded.