Staaarter

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.

By Staaarter Team
FAQ
Docs
Live preview

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.json

Prefer 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

PropTypeDefaultDescription
badgestringnoneSmall pill label above the heading in the left column.
headingstringnoneSection heading in the left column.
descriptionstringnoneSection intro text in the left column.
itemsFaqItem[]noneNumbered question cards rendered in the right column.
classNamestringnoneExtra 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.