Staaarter

FAQ With Contact

A numbered FAQ accordion paired with a bordered contact card in the aside, showing a portrait, a short prompt, and a contact CTA for questions the FAQ doesn't answer.

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 button, media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/faq-with-contact.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/faq/faq69.tsx instead.

Usage

The file also exports faq69Demo, 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 { Faq69, faq69Demo } from "@/components/blocks/faq/faq69";

export default function Page() {
  return <Faq69 {...faq69Demo} />;
}

Props

PropTypeDefaultDescription
badgestringnoneSmall eyebrow label above the heading.
headingstringnoneSection heading.
descriptionstringnoneSection intro text.
itemsFaqItem[]noneNumbered questions rendered in the main accordion column.
contactImageMediaSlotImagenonePortrait shown at the top of the contact card.
contactPromptstringnoneShort line of copy inside the contact card.
contactButtonLabelstring"Contact us"Label on the inert contact button.
classNamestringnoneExtra classes for the outer section element.

Types

type FaqItem = {
  question: string;
  answer: string;
};

Behavior notes

  • "use client" because the main column is a real accordion holding local open-index state.
  • Questions are numbered 01, 02, etc. in the order supplied; the numbering is purely visual and doesn't affect which item opens first.
  • The aside contact card sticks to the viewport (lg:sticky lg:top-24) while the accordion scrolls beside it on large screens.
  • The contact button is inert by design: there is no backend to send a message to, so clicking it does nothing.