# Pricing section

A responsive SaaS plan comparison section with explicit consumer-owned prices, billing options and native actions.

Access: pro. Category: Marketing. Kind: section.

## When to use

- Use it when a page needs a responsive saas plan comparison section with explicit consumer-owned prices, billing options and native actions.
- Choose it as the pricing region when composing a page from independently reusable TidalUI sections.

## Alternatives

- Choose pricing-card instead when the consumer already owns the surrounding pricing layout.

## Setup for agents

Use React 19 and TypeScript. Initialize shadcn for your framework, then merge this exact entry into components.json:

```json
{
  "registries": {
    "@tidal-pro": {
      "url": "https://tidalui.com/r/pro/{name}.json",
      "headers": {
        "Authorization": "Bearer ${TIDALUI_TOKEN}"
      }
    }
  }
}
```

The namespace must be named **@tidal-pro** because transitive Pro dependencies use that namespace. Obtain an agent key from your active Pro account at https://tidalui.com/account. Keep TIDALUI_TOKEN in your local environment, never in components.json, client code, Git or logs.

```sh
export TIDALUI_TOKEN='your-private-agent-key'
npx shadcn@latest add @tidal-pro/waitlist-form
npx shadcn@latest add https://tidalui.com/r/tidal-button.json
```

Free command: `npx shadcn@latest add https://tidalui.com/r/<name>.json`.
Pro command: `npx shadcn@latest add @tidal-pro/<name>`.

Import the base stylesheet and every stylesheet listed on the installed item's metadata. For example:

```tsx
import "./components/ui/tidal.css";
import "./components/ui/hero-section.css";
// Place installed components inside this wrapper:
<div className="tidal-scope" data-theme="dark">...</div>
```

Omit data-theme for the default light theme. Put the attribute on the same tidal-scope element for dark mode. Every component installs the shared free tidal-base dependency. After upgrading, run `npx shadcn@latest add https://tidalui.com/r/tidal-base.json --overwrite` to receive current tokens. Review local modifications before overwriting.

Vite: Use React + TypeScript. Map @/* to ./src/* in paths and Vite resolve.alias. Import tidal.css and each component stylesheet in your application entry.

Next.js 15 App Router: Next.js App Router: import tidal.css and component CSS in app/layout.tsx. Interactive examples belong in a client component with "use client". Map @/* to ./* or ./src/* to match your project.

TypeScript 6: use paths without baseUrl:

```json
{
  "compilerOptions": {
    "paths": {
      "@/*": [
        "./src/*"
      ]
    }
  }
}
```

Pro registry requests are server/CLI-only. Use the same-origin account interface in a browser; cross-origin Authorization preflights are intentionally unsupported.


## Install Pricing section

```sh
npx shadcn@latest add @tidal-pro/pricing-section
```

Stylesheets: `components/ui/tidal.css`, `components/ui/pricing-section.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/pricing-section.css";
import{TidalPricingSection}from"./components/ui/pricing-section";
export default(p:Parameters<typeof TidalPricingSection>[0])=><div className="tidal-scope"><TidalPricingSection {...p}/></div>;
```

## Structured props

- `TidalPricingSection.billingOptions: ReadonlyArray<TidalPricingBillingOption>`: Required billing options value accepted by this exported component.
- `TidalPricingSection.plans: ReadonlyArray<TidalPricingPlan>`: Required plans value accepted by this exported component.
- `TidalPricingSection.title: string`: Required title value accepted by this exported component.
- `TidalPricingSection.billing?: string | undefined`: Optional billing value accepted by this exported component.
- `TidalPricingSection.defaultBilling?: string | undefined`: Optional default billing value accepted by this exported component.
- `TidalPricingSection.defaultSelectedPlanId?: string | null | undefined` (default null): Optional default selected plan id value accepted by this exported component.
- `TidalPricingSection.description?: string | undefined`: Optional description value accepted by this exported component.
- `TidalPricingSection.eyebrow?: string | undefined` (default "Plans"): Optional eyebrow value accepted by this exported component.
- `TidalPricingSection.onBillingChange?: ((billing: TidalPricingBillingOption) => void) | undefined`: Callback invoked when the billing change interaction is proposed.
- `TidalPricingSection.onPlanSelect?: ((plan: TidalPricingPlan, billing: TidalPricingBillingOption) => void) | undefined`: Callback invoked when the plan select interaction is proposed.
- `TidalPricingSection.onSelectedPlanChange?: ((plan: TidalPricingPlan) => void) | undefined`: Callback invoked when the selected plan change interaction is proposed.
- `TidalPricingSection.selectedPlanId?: string | null | undefined`: Optional selected plan id value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/pricing-section.tsx) | [Manifest](https://tidalui.com/examples/pricing-section.json). Install the listed additional dependencies. Consumer fixture: TypeScript pass; Vite pass. This fixture check is distinct from the actual shadcn install receipt.

```tsx
"use client";

import "./components/ui/tidal.css";

import { useState } from "react";

import { ArrowRight, Check } from "lucide-react";

import { TidalPricingSection, type TidalPricingBillingOption, type TidalPricingPlan } from "./components/ui/pricing-section";

import "./components/ui/pricing-section.css";



const tidalExampleStyles = ".tidal-scope .pricing-section-demo {\n  container-type: inline-size;\n  width: 100%;\n  min-width: 0;\n}\n\n.tidal-scope .pricing-section-demo-selection {\n  display: flex;\n  align-items: flex-start;\n  gap: 12px;\n  min-width: 0;\n  margin-top: 14px;\n  padding: 14px 16px;\n  border: 1px solid var(--t-border);\n  border-radius: 12px;\n  background: var(--t-subtle);\n}\n\n.tidal-scope .pricing-section-demo-selection-mark {\n  display: grid;\n  flex: none;\n  width: 30px;\n  height: 30px;\n  place-items: center;\n  border-radius: 50%;\n  background: var(--t-ink);\n  color: var(--t-surface);\n}\n\n.tidal-scope .pricing-section-demo-selection > div:last-child {\n  min-width: 0;\n}\n\n.tidal-scope .pricing-section-demo-selection > div:last-child > span {\n  display: block;\n  color: var(--t-muted);\n  font-size: 11px;\n  letter-spacing: 0.8px;\n  text-transform: uppercase;\n}\n\n.tidal-scope .pricing-section-demo-selection p {\n  margin: 5px 0 0;\n  color: var(--t-ink);\n  font-size: 11px;\n  line-height: 1.5;\n  overflow-wrap: anywhere;\n}\n\n.tidal-scope .pricing-section-demo-note {\n  margin: 12px 2px 0;\n  color: var(--t-muted);\n  font-size: 11px;\n  line-height: 1.55;\n  overflow-wrap: anywhere;\n}";

const SAMPLE_BILLING_OPTIONS = [
  {
    id: "monthly",
    label: "Monthly",
    period: "sample / month",
    note: "Illustrative monthly figure",
  },
  {
    id: "annual",
    label: "Annual",
    period: "sample / year",
    note: "Illustrative annual total",
  },
] as const satisfies readonly TidalPricingBillingOption[];

const SAMPLE_PLANS = [
  {
    id: "maker",
    name: "Maker",
    description: "A focused home for one small product team.",
    prices: {
      monthly: {
        amount: "$18",
        period: "sample / month",
        note: "Illustrative sample price",
      },
      annual: {
        amount: "$180",
        period: "sample / year",
        note: "Illustrative sample total",
      },
    },
    features: [
      { id: "projects", label: "Unlimited project spaces" },
      {
        id: "reviews",
        label: "Review-ready sharing",
        detail: "Comment and resolve in one place",
      },
      { id: "history", label: "Activity history", detail: "30 days" },
      { id: "roles", label: "Advanced team roles", included: false },
    ],
    action: {
      label: "Preview Maker",
      type: "button",
      "aria-label": "Select Maker sample plan",
    },
  },
  {
    id: "studio",
    name: "Studio",
    description: "A roomy operating layer for an active product studio.",
    badge: "Sample favorite",
    featured: true,
    prices: {
      monthly: {
        amount: "$42",
        period: "sample / month",
        note: "Illustrative sample price",
      },
      annual: {
        amount: "$420",
        period: "sample / year",
        note: "Illustrative sample total",
      },
    },
    features: [
      { id: "projects", label: "Unlimited project spaces" },
      {
        id: "reviews",
        label: "Review-ready sharing",
        detail: "Comment and resolve in one place",
      },
      { id: "history", label: "Activity history", detail: "1 year" },
      { id: "roles", label: "Advanced team roles" },
    ],
    action: {
      label: "Preview Studio",
      type: "button",
      "aria-label": "Select Studio sample plan",
    },
  },
  {
    id: "scale",
    name: "Scale",
    description: "A deliberate system for several connected teams.",
    prices: {
      monthly: {
        amount: "$78",
        period: "sample / month",
        note: "Illustrative sample price",
      },
      annual: {
        amount: "$780",
        period: "sample / year",
        note: "Illustrative sample total",
      },
    },
    features: [
      { id: "projects", label: "Unlimited project spaces" },
      {
        id: "reviews",
        label: "Review-ready sharing",
        detail: "Comment and resolve in one place",
      },
      { id: "history", label: "Activity history", detail: "Unlimited" },
      { id: "roles", label: "Advanced team roles" },
    ],
    action: {
      label: "See Scale details",
      href: "#sample-selection",
      "aria-label": "Select Scale sample plan and view local details",
    },
  },
] as const satisfies readonly TidalPricingPlan[];

export function PricingSectionDemo() {
  const [billing, setBilling] = useState("monthly");
  const [selectedPlanId, setSelectedPlanId] = useState<string | null>(null);
  const selectedPlan = SAMPLE_PLANS.find((plan) => plan.id === selectedPlanId);
  const selectedPrice =
    selectedPlan?.prices[billing as keyof typeof selectedPlan.prices];

  return (
    <div className="pricing-section-demo">
      <TidalPricingSection
        title="Choose your plan"
        eyebrow="Sample plans"
        description="Compare sample plans and billing periods, then review the selected plan."
        plans={SAMPLE_PLANS}
        billingOptions={SAMPLE_BILLING_OPTIONS}
        billing={billing}
        selectedPlanId={selectedPlanId}
        onBillingChange={(option) => setBilling(option.id)}
        onPlanSelect={(plan) => setSelectedPlanId(plan.id)}
      />

      <section
        className="pricing-section-demo-selection"
        id="sample-selection"
        aria-label="Selected sample plan"
      >
        <div className="pricing-section-demo-selection-mark" aria-hidden="true">
          {selectedPlan ? <Check size={16} /> : <ArrowRight size={16} />}
        </div>
        <div>
          <span>Local selection</span>
          <p role="status" aria-live="polite">
            {selectedPlan && selectedPrice
              ? `${selectedPlan.name} selected for this preview: ${selectedPrice.amount} ${selectedPrice.period}. ${selectedPrice.note}. No checkout is connected.`
              : "Select a sample plan to see its supplied value here. No checkout is connected."}
          </p>
        </div>
      </section>
      <p className="pricing-section-demo-note">
        Fictional plan values for local comparison. No checkout or account
        action is connected.
      </p>
    </div>
  );
}

export default function AgentExample() {
  return (
    <div className="tidal-scope" data-theme="light" dir="ltr">
      <style>{tidalExampleStyles}</style>
      <PricingSectionDemo />
    </div>
  );
}

```

## Gotchas

- The host application owns data, validation, persistence, navigation, and service side effects described by this API.

## Theme and accessibility

{"tokens":["--t-accent","--t-border","--t-border-strong","--t-canvas","--t-danger","--t-display","--t-ease-out","--t-ease-spring","--t-faint","--t-font","--t-ink","--t-line","--t-muted","--t-primary","--t-primary-contrast","--t-radius-card","--t-radius-control","--t-radius-overlay","--t-radius-panel","--t-ring","--t-shadow-lg","--t-shadow-soft","--t-soft","--t-subtle","--t-surface","--t-wash"],"darkMode":true}

{"keyboard":["Tab and Shift+Tab follow the component's native focus order.","Arrow-key behavior follows the exported composite-control implementation."],"aria":"The component wires labels and relationships from consumer-provided visible text or ARIA props; preserve those labels in production.","notes":"Verify focus visibility, text alternatives, contrast, and reduced motion in the final composition."}

Root forwards native section attributes/ref/style. Required title, plans and billingOptions; arbitrary plan arrays drive both the plan grid and comparison cells. Each plan supplies explicit prices keyed by billing option id, features and a native button or anchor action. Features sharing an ID define one comparison row: use a consistent label and put plan-specific limits in detail. billing/defaultBilling control the selected billing option; onBillingChange receives the supplied option. A controlled billing value without onBillingChange is rendered as a native disabled read-only selector. selectedPlanId/defaultSelectedPlanId control local plan selection; selected plans expose their state in the accessible article name; onSelectedPlanChange and onPlanSelect receive the selected plan, with onPlanSelect also receiving the active billing option. Plan button actions forward native button props/ref/type/disabled/form attributes; link actions forward native anchor props/ref/href and prevent activation when disabled or aria-disabled=true. The component renders a plan comparison grid with readable inclusion states, keeps all values consumer-owned, uses no pricing math, requests, storage or timers, and honors reduced motion.
