Staaarter

Tabbed Audience Pricing

A centered heading sits above a pill-style tab switcher; clicking a tab swaps in that audience's own set of plan cards, each with its own pricing, features, and CTA. Useful when the same product is sold differently to individuals and teams, or to different customer segments.

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/tabbed-audience-pricing.json

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

Usage

The file also exports pricing7Demo, 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 { Pricing7, pricing7Demo } from "@/components/blocks/pricing/pricing7";

export default function Page() {
  return <Pricing7 {...pricing7Demo} />;
}

Props

PropTypeDefaultDescription
headingReactNodeundefinedCentered headline above the tab switcher.
descriptionstringundefinedSupporting subtext below the heading.
audiencesAudienceTab[]noneEach tab's id, label, and its own array of pricing plans. 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 AudienceTab = {
  id: string;
  label: string;
  plans: PricingPlan[];
};

Behavior notes

  • The tabs are real local state: clicking a tab button calls setActiveId and the plan cards below re-render from that tab's own plans array in props, not hardcoded copies.
  • The grid layout adapts to how many plans the active tab has (2 columns for two plans, 3 for three) so mismatched audience plan counts still look intentional.
  • All CTA buttons are inert placeholders (href defaults to "#" in the demo) with no real navigation or checkout wired up.