Staaarter

Pricing With FAQ

Two or three pricing tier cards sit above a compact FAQ section addressing common billing questions like changing plans or refunds. Each question is a real accordion trigger; opening one question closes any other that was open, keeping the list scannable.

By Staaarter Team
Pricing
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its badge, button dependencies and any missing npm packages, and installs them straight into your project.

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

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

Usage

The file also exports pricing9Demo, 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 { Pricing9, pricing9Demo } from "@/components/blocks/pricing/pricing9";

export default function Page() {
  return <Pricing9 {...pricing9Demo} />;
}

Props

PropTypeDefaultDescription
headingReactNodeundefinedCentered headline above the pricing cards.
descriptionstringundefinedSupporting subtext below the heading.
plansPricingPlan[]nonePricing tier cards (2-3 recommended). Required.
faqHeadingstringundefinedHeading above the FAQ list.
faqsFaqItem[]noneQuestion/answer pairs rendered as accordion rows. Required.
classNamestringnoneExtra classes for the outer section element.

Types

type PricingPlan = {
  name: string;
  price: string;
  period?: string;
  description?: string;
  features: string[];
  ctaLabel: string;
  ctaHref?: string;
  highlighted?: boolean;
};

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

Behavior notes

  • The FAQ accordion is real local state: each question is a genuine <button aria-expanded> that toggles an openIndex value, only one answer is expanded at a time, and clicking the currently open question closes it.
  • All questions start collapsed on load; nothing is derived from props in an effect.
  • All pricing card CTA buttons are inert placeholders (href defaults to "#" in the demo) with no real navigation or checkout wired up.