FAQ with Side Heading and Numbered Cards
A two-column FAQ section pairing a sticky badge, heading, and description on the left with a stacked list of numbered cards on the right; each card opens to reveal a plain answer block directly below its question, with no separator line between them.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its badge dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/faq-side-heading-numbered-cards.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/faq/faq68.tsx instead.
Usage
The file also exports faq68Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Faq68, faq68Demo } from "@/components/blocks/faq/faq68"; export default function Page() { return <Faq68 {...faq68Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| badge | string | none | Small pill label above the heading in the left column. |
| heading | string | none | Section heading in the left column. |
| description | string | none | Section intro text in the left column. |
| items | FaqItem[] | none | Numbered question cards rendered in the right column. |
| className | string | none | Extra classes for the outer section element. |
Types
type FaqItem = { question: string; answer: string; };
Behavior notes
- "use client" because each numbered card is a real accordion holding local open-index state.
- The left column (badge, heading, description) is entirely static and sticks to the viewport (lg:sticky lg:top-24) while the right column's cards scroll beside it.
- Clicking a card's question reveals its answer directly underneath, within the same card, with only vertical spacing (no border-t or hairline) separating question from answer.
- Only one card is open at a time; opening a new card closes whichever card was previously open.
More FAQ Blocks
View all →collapsible-accordion
Collapsible Accordion
Stacked cards with expandable sections, for full-length answers in a compact format.
open-list-layout
Open List Layout
Questions with answers displayed directly below in a simple always-open list.
three-column-grid
Three Column Grid
Q&A pairs arranged in a responsive grid layout, always open.
tabbed-categories
Tabbed Categories
Sidebar navigation with category tabs and an accordion of that category's questions.
searchable-accordion
Searchable Accordion
Search input that filters accordion items in real-time by question and answer text.
grouped-sections
Grouped Sections
FAQs organized into titled sections, each with its own independent accordion below it.