Pricing

Plans side by side as cards, one highlighted, with a monthly and yearly switch when they have yearly prices, here two plans with no heading of their own, as under a page's hero.

  • Plan 1

    Badge
    A short line about who this plan is for goes here.

    $49/month

    • Feature 1
    • Feature 2
    • Feature 3
    • Feature 4
    • Feature 5
    • Feature 6
    • Feature 7
  • Plan 2

    A short line about who this plan is for goes here.

    $199/month

    • Feature 1
    • Feature 2
    • Feature 3
    • Feature 4
    • Feature 5
    • Feature 6
    • Feature 7
import { Pricing, type PricingPlan } from "@produkto/ui/Pricing";

const plans: PricingPlan[] = [
  {
    name: "Plan 1",
    description: "A short line about who this plan is for goes here.",
    price: { monthly: "$49", yearly: "$468" },
    features: [
      "Feature 1",
      "Feature 2",
      "Feature 3",
      "Feature 4",
      "Feature 5",
      "Feature 6",
      "Feature 7",
    ],
    action: { label: "Button", link: "#" },
    highlighted: true,
    badge: "Badge",
  },
  {
    name: "Plan 2",
    description: "A short line about who this plan is for goes here.",
    price: { monthly: "$199", yearly: "$1,908" },
    features: [
      "Feature 1",
      "Feature 2",
      "Feature 3",
      "Feature 4",
      "Feature 5",
      "Feature 6",
      "Feature 7",
    ],
    action: { label: "Button", link: "#" },
  },
];

const Example = () => <Pricing plans={plans} />;

export default Example;

Usage

import { Pricing, type PricingPlan } from "@produkto/ui/Pricing";
const plans: PricingPlan[] = [
  {
    name: "Plan 1",
    description: "A short line about who this plan is for goes here.",
    price: { monthly: "$9", yearly: "$90" },
    features: ["Feature 1", "Feature 2"],
    action: { label: "Button", link: "#" },
  },
  {
    name: "Plan 2",
    description: "A short line about who this plan is for goes here.",
    price: { monthly: "$19", yearly: "$190" },
    features: ["Feature 1", "Feature 2", "Feature 3"],
    action: { label: "Button", link: "#" },
    highlighted: true,
    badge: "Badge",
  },
];

<Pricing
  eyebrow="Pricing"
  title="Your headline goes here"
  description="A short line about the plans goes here."
  plans={plans}
/>

Examples

One plan beside the list

layout="split" names every plan with its line beside the card of the highlighted one, or the first.

Pricing

Your headline goes here

A short line about the plans goes here.

  • Plan 1

    A short line about who this plan is for goes here.

  • Plan 2

    A short line about who this plan is for goes here.

  • Plan 3

    A short line about who this plan is for goes here.

  • Plan 2

    Badge
    A short line about who this plan is for goes here.

    $110

    • Feature 1
    • Feature 2
    • Feature 3
import { Pricing, type PricingPlan } from "@produkto/ui/Pricing";

const plans: PricingPlan[] = [
  {
    name: "Plan 1",
    description: "A short line about who this plan is for goes here.",
    price: "$80",
  },
  {
    name: "Plan 2",
    description: "A short line about who this plan is for goes here.",
    price: "$110",
    features: ["Feature 1", "Feature 2", "Feature 3"],
    action: { label: "Button", link: "#" },
    highlighted: true,
    badge: "Badge",
  },
  {
    name: "Plan 3",
    description: "A short line about who this plan is for goes here.",
    price: "$160",
  },
];

const Example = () => (
  <Pricing
    align="start"
    description="A short line about the plans goes here."
    eyebrow="Pricing"
    layout="split"
    plans={plans}
    title="Your headline goes here"
  />
);

export default Example;

Two plans

Two plans share a row at a readable width, a price written as a string, such as "$0", shows without a unit, and with no yearly prices there is no switch.

Pricing

Your headline goes here

A short line about the plans goes here.

  • Plan 1

    A short line about who this plan is for goes here.

    $0

    • Feature 1
    • Feature 2
    • Feature 3
  • Plan 2

    Badge
    A short line about who this plan is for goes here.

    $19/month

    • Feature 1
    • Feature 2
    • Feature 3
    • Feature 4
import { Pricing, type PricingPlan } from "@produkto/ui/Pricing";

const plans: PricingPlan[] = [
  {
    name: "Plan 1",
    description: "A short line about who this plan is for goes here.",
    price: "$0",
    features: ["Feature 1", "Feature 2", "Feature 3"],
    action: { label: "Button", link: "#" },
  },
  {
    name: "Plan 2",
    description: "A short line about who this plan is for goes here.",
    price: { monthly: "$19" },
    features: ["Feature 1", "Feature 2", "Feature 3", "Feature 4"],
    action: { label: "Button", link: "#" },
    highlighted: true,
    badge: "Badge",
  },
];

const Example = () => (
  <Pricing
    description="A short line about the plans goes here."
    eyebrow="Pricing"
    plans={plans}
    title="Your headline goes here"
  />
);

export default Example;

One plan

A single plan stands alone at the width of a card.

Pricing

Your headline goes here

A short line about the plan goes here.

  • Plan 1

    A short line about who this plan is for goes here.

    $29/month

    • Feature 1
    • Feature 2
    • Feature 3
    • Feature 4
    • Feature 5
import { Pricing, type PricingPlan } from "@produkto/ui/Pricing";

const plans: PricingPlan[] = [
  {
    name: "Plan 1",
    description: "A short line about who this plan is for goes here.",
    price: { monthly: "$29", yearly: "$290" },
    features: ["Feature 1", "Feature 2", "Feature 3", "Feature 4", "Feature 5"],
    action: { label: "Button", link: "#" },
  },
];

const Example = () => (
  <Pricing
    description="A short line about the plan goes here."
    eyebrow="Pricing"
    plans={plans}
    title="Your headline goes here"
  />
);

export default Example;

Comparison table

Plans list the same lines, and included: false strikes out the ones a plan lacks, so they compare line by line.

Pricing

Your headline goes here

A short line about the plans goes here.

  • Plan 1

    A short line about who this plan is for goes here.

    $9/month

    • Feature 1
    • Feature 2
    • Feature 3(not included)
    • Feature 4(not included)
    • Feature 5(not included)
  • Plan 2

    Badge
    A short line about who this plan is for goes here.

    $19/month

    • Feature 1
    • Feature 2
    • Feature 3
    • Feature 4
    • Feature 5(not included)
  • Plan 3

    A short line about who this plan is for goes here.

    Custom

    • Feature 1
    • Feature 2
    • Feature 3
    • Feature 4
    • Feature 5
import { Pricing, type PricingPlan } from "@produkto/ui/Pricing";

const plans: PricingPlan[] = [
  {
    name: "Plan 1",
    description: "A short line about who this plan is for goes here.",
    price: { monthly: "$9" },
    features: [
      { label: "Feature 1" },
      { label: "Feature 2" },
      { label: "Feature 3", included: false },
      { label: "Feature 4", included: false },
      { label: "Feature 5", included: false },
    ],
    action: { label: "Button", link: "#" },
  },
  {
    name: "Plan 2",
    description: "A short line about who this plan is for goes here.",
    price: { monthly: "$19" },
    features: [
      { label: "Feature 1" },
      { label: "Feature 2" },
      { label: "Feature 3" },
      { label: "Feature 4" },
      { label: "Feature 5", included: false },
    ],
    action: { label: "Button", link: "#" },
    highlighted: true,
    badge: "Badge",
  },
  {
    name: "Plan 3",
    description: "A short line about who this plan is for goes here.",
    price: "Custom",
    features: [
      { label: "Feature 1" },
      { label: "Feature 2" },
      { label: "Feature 3" },
      { label: "Feature 4" },
      { label: "Feature 5" },
    ],
    action: { label: "Button", link: "#" },
  },
];

const Example = () => (
  <Pricing
    description="A short line about the plans goes here."
    eyebrow="Pricing"
    plans={plans}
    title="Your headline goes here"
  />
);

export default Example;

Plans only

PricingPlans draws the switch and the plans without a Section, for a panel or a dialog. An action without a link is a button: onClick runs, loading holds it with a spinner, and period with onPeriodChange keeps the switch in the caller's hands.

  • Plan 1

    $90/year

    • Feature 1
    • Feature 2
  • Plan 2

    Badge

    $190/year

    • Feature 1
    • Feature 2
    • Feature 3
import {
  PricingPlans,
  type PricingPeriod,
  type PricingPlan,
} from "@produkto/ui/Pricing";
import { useState } from "react";

const Example = () => {
  const [period, setPeriod] = useState<PricingPeriod>("yearly");
  const [buying, setBuying] = useState<string | null>(null);
  const action = (name: string) => ({
    label: "Button",
    loading: buying === name,
    onClick: () => setBuying(buying === name ? null : name),
  });
  const plans: PricingPlan[] = [
    {
      name: "Plan 1",
      price: { monthly: "$9", yearly: "$90" },
      features: ["Feature 1", "Feature 2"],
      action: action("Plan 1"),
    },
    {
      name: "Plan 2",
      price: { monthly: "$19", yearly: "$190" },
      features: ["Feature 1", "Feature 2", "Feature 3"],
      action: { label: "Button", tone: "destructive" },
      highlighted: true,
      badge: "Badge",
    },
  ];
  return (
    <PricingPlans onPeriodChange={setPeriod} period={period} plans={plans} />
  );
};

export default Example;

API Reference

Pricing

PricingProps · blocks/Pricing/Pricing.types.ts
PropTypeDefault
plansPricingPlan[]-
layoutPricingLayout"cards" | "split""cards"
periodPricingPeriod"monthly" | "yearly"-
defaultPeriodPricingPeriod"monthly" | "yearly"-
onPeriodChange(period: PricingPeriod) => void(period: ("monthly" | "yearly")) => void-
idstring-
eyebrowstring-
titleReactNode-
descriptionReactNode-
alignSectionAlign"start" | "center" | "end""center"
mutedbooleanfalse
classNamestring-

PricingPlans

PricingPlansProps
PropTypeDefault
plansrequiredPricingPlan[]-
periodPricingPeriod"monthly" | "yearly"-
defaultPeriodPricingPeriod"monthly" | "yearly""monthly"
onPeriodChange(period: PricingPeriod) => void(period: ("monthly" | "yearly")) => void-
alignSectionAlign"start" | "center" | "end""center"
headingLevelPricingHeadingLevel2 | 33
classNamestring-

PricingPlan

used by plans
PropTypeDefault
namerequiredstring-
descriptionstring-
pricerequiredstring | PricingPrice-
features(string | PricingFeature)[]-
actionPricingAction-
highlightedboolean-
badgestring-

PricingPrice

used by its parts
PropTypeDefault
monthlyrequiredstring-
yearlystring-

PricingFeature

used by its parts
PropTypeDefault
labelrequiredstring-
includedboolean-

PricingAction

used by its parts
PropTypeDefault
labelrequiredstring-
linkstring-
onClick() => void-
appearanceButtonAppearance"solid" | "soft" | "outline" | "transparent"-
toneButtonTone"neutral" | "accent" | "destructive" | "success" | "warning" | "info"-
iconReactNode-
loadingboolean-
disabledboolean-