ComponentsEditorial

Pricing

A connected pricing panel with one outer frame and hairline dividers. Plans share five fixed rows: name and optional badge, price, description, features and action. Responsive columns stack on narrow screens; featured is a styling hook.

Open the preview in a new tab

The source comes with full access.

One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.

Installation

pnpm dlx shadcn add @01orbital/pricing
npx shadcn add @01orbital/pricing
yarn shadcn add @01orbital/pricing
bunx --bun shadcn add @01orbital/pricing

Part of the 01orbital library. With a license, put ORBITAL_TOKEN in .env.local and the same command installs it (licensed install, pricing).

It lands at components/editorial/pricing.tsx, as source you own and edit.

The example also uses button. Install it too:

pnpm dlx shadcn add @01orbital/button
npx shadcn add @01orbital/button
yarn shadcn add @01orbital/button
bunx --bun shadcn add @01orbital/button

The example also imports @phosphor-icons/react from npm, which the install does not add:

pnpm add @phosphor-icons/react
npm install @phosphor-icons/react
yarn add @phosphor-icons/react
bun add @phosphor-icons/react

Usage

import { CheckIcon } from "@phosphor-icons/react/dist/ssr"

import {
  Pricing,
  PricingCard,
  PricingCardAmount,
  PricingCardContent,
  PricingCardDescription,
  PricingCardFeature,
  PricingCardFeatures,
  PricingCardFooter,
  PricingCardHeader,
  PricingCardPeriod,
  PricingCardPrice,
  PricingCardTitle,
} from "@/components/editorial/pricing"
import { Button } from "@/components/ui/button"

const COPY = {
  period: "/ month",
  cta: "Get started",
  plans: [
    {
      name: "Starter",
      price: "$12",
      description: "Side projects and first deploys.",
      features: ["Up to 2 projects", "Preview deploys", "Email support"],
      featured: false,
    },
    {
      name: "Growth",
      price: "$49",
      description: "Teams pushing to production every day.",
      features: ["Unlimited projects", "Concurrent builds", "Priority support"],
      featured: true,
    },
  ],
} as const

export default function PricingDemo() {
  return (
    <Pricing cols={2}>
      {COPY.plans.map((plan) => (
        <PricingCard key={plan.name} featured={plan.featured}>
          <PricingCardHeader>
            <PricingCardTitle>{plan.name}</PricingCardTitle>
            <PricingCardPrice>
              <PricingCardAmount>{plan.price}</PricingCardAmount>
              <PricingCardPeriod>{COPY.period}</PricingCardPeriod>
            </PricingCardPrice>
            <PricingCardDescription>{plan.description}</PricingCardDescription>
          </PricingCardHeader>
          <PricingCardContent>
            <PricingCardFeatures>
              {plan.features.map((feature) => (
                <PricingCardFeature key={feature}>
                  <CheckIcon weight="bold" aria-hidden="true" />
                  {feature}
                </PricingCardFeature>
              ))}
            </PricingCardFeatures>
          </PricingCardContent>
          <PricingCardFooter>
            <Button variant={plan.featured ? "default" : "outline"}>
              {COPY.cta}
            </Button>
          </PricingCardFooter>
        </PricingCard>
      ))}
    </Pricing>
  )
}

Anatomy

Pricing is built from 16 parts. In the example they nest like this:

Pricing
└─ PricingCard
   ├─ PricingCardHeader
   │  ├─ PricingCardTitle
   │  ├─ PricingCardPrice
   │  │  ├─ PricingCardAmount
   │  │  └─ PricingCardPeriod
   │  └─ PricingCardDescription
   ├─ PricingCardContent
   │  └─ PricingCardFeatures
   │     └─ PricingCardFeature
   └─ PricingCardFooter
  • Pricing: A connected panel of plans, with one outer frame and 1px dividers. Each PricingCard shares five rows with its neighbours: name and optional badge, price, description, features, and action. Keep that order, with a PricingCardHeader, PricingCardContent and PricingCardFooter in each card. The header contains the first three rows. Cards must render as direct children of the panel for their shared rows to line up.
  • PricingCard: One plan, built on the stock Card. Put a PricingCardHeader inside it, then PricingCardContent and PricingCardFooter. Inside Pricing its five rows line up with the other plans, and its individual rounding, shadow and ring give way to the panel's shared frame. Its inner spacing grows from 24px to 32px once the panel is 60rem wide. Outside Pricing, it grows at a viewport width of 42rem.
  • PricingCardHeader: The top of a plan card. Holds PricingCardTitle, an optional PricingCardAction, PricingCardPrice and PricingCardDescription, in a grid with 16px gaps. A PricingCardAction gets a column of its own on the right.
  • PricingCardTitle: The plan's name, an h3 by default. Pass render to use another heading level.
  • PricingCardPrice: The price line, a paragraph that sets PricingCardAmount and PricingCardPeriod on one baseline. When the amount is too long to share the line, the period wraps under it.
  • PricingCardAmount: The price figure. Inside Pricing it is 32px, growing to 56px when the panel reaches 60rem and the price line has at least 16rem of space. Outside it is 36px.
  • PricingCardPeriod: The billing period beside PricingCardAmount, in smaller muted type.
  • PricingCardDescription: A short muted paragraph about the plan, across the full header width.
  • PricingCardContent: The middle of a plan card, under the header. Holds PricingCardFeatures and any other body content, stacked with 24px gaps.
  • PricingCardFeatures: The list of what a plan includes. Holds PricingCardFeature items.
  • PricingCardFeature: One line in PricingCardFeatures, an li by default. Put an icon first: an svg child is sized 20px wide and 24px tall, never shrinks, and sits 12px from the text. Inside Pricing the icon is 20px tall to follow the tighter feature text.
  • PricingCardFooter: The bottom of a plan card, for its call to action. Inside Pricing, actions fit their content and sit at least 32px below the body. Outside it, a single button stretches to the card's width. Add flex-row to set several actions side by side.
  • PricingGroup: A vertical stack with a 32px gap, for setting a control such as PricingToggle above Pricing.
  • PricingCellCard: A flat PricingCard. Inside Pricing it follows the panel's 24px to 32px inner spacing; outside it has 32px spacing for a locally arranged panel.
  • PricingCardAction: A slot at the top right of PricingCardHeader, beside the title, for a PricingCardBadge. It stays on the first row, beside PricingCardTitle.
  • PricingCardBadge: The stock Badge, for a plan label, usually inside PricingCardAction.

API reference

Pricing

A connected panel of plans, with one outer frame and 1px dividers. Each PricingCard shares five rows with its neighbours: name and optional badge, price, description, features, and action. Keep that order, with a PricingCardHeader, PricingCardContent and PricingCardFooter in each card. The header contains the first three rows. Cards must render as direct children of the panel for their shared rows to line up.

Built on Grid. Three-plan panels stay stacked until their available width reaches 60rem, then show all three columns. className styles the panel. Size its parent to constrain the available width.

Prop

Type

It also accepts the HTML attributes of the element it renders.

PricingCard

One plan, built on the stock Card. Put a PricingCardHeader inside it, then PricingCardContent and PricingCardFooter. Inside Pricing its five rows line up with the other plans, and its individual rounding, shadow and ring give way to the panel's shared frame. Its inner spacing grows from 24px to 32px once the panel is 60rem wide. Outside Pricing, it grows at a viewport width of 42rem.

Prop

Type

It also accepts the HTML attributes of the element it renders.

PricingCardHeader

The top of a plan card. Holds PricingCardTitle, an optional PricingCardAction, PricingCardPrice and PricingCardDescription, in a grid with 16px gaps. A PricingCardAction gets a column of its own on the right.

Inside Pricing it spans exactly three shared rows: name with an optional action, price, then description. Keep those three regions in that order.

It accepts the HTML attributes of the element it renders.

PricingCardTitle

The plan's name, an h3 by default. Pass render to use another heading level.

It accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

PricingCardPrice

The price line, a paragraph that sets PricingCardAmount and PricingCardPeriod on one baseline. When the amount is too long to share the line, the period wraps under it.

It accepts the HTML attributes of the element it renders.

PricingCardAmount

The price figure. Inside Pricing it is 32px, growing to 56px when the panel reaches 60rem and the price line has at least 16rem of space. Outside it is 36px.

It accepts the HTML attributes of the element it renders.

PricingCardPeriod

The billing period beside PricingCardAmount, in smaller muted type.

It accepts the HTML attributes of the element it renders.

PricingCardDescription

A short muted paragraph about the plan, across the full header width.

It accepts the HTML attributes of the element it renders.

PricingCardContent

The middle of a plan card, under the header. Holds PricingCardFeatures and any other body content, stacked with 24px gaps.

It accepts the HTML attributes of the element it renders.

PricingCardFeatures

The list of what a plan includes. Holds PricingCardFeature items.

It accepts the HTML attributes of the element it renders.

PricingCardFeature

One line in PricingCardFeatures, an li by default. Put an icon first: an svg child is sized 20px wide and 24px tall, never shrinks, and sits 12px from the text. Inside Pricing the icon is 20px tall to follow the tighter feature text.

It accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

The bottom of a plan card, for its call to action. Inside Pricing, actions fit their content and sit at least 32px below the body. Outside it, a single button stretches to the card's width. Add flex-row to set several actions side by side.

It accepts the HTML attributes of the element it renders.

PricingGroup

A vertical stack with a 32px gap, for setting a control such as PricingToggle above Pricing.

It accepts the HTML attributes of the element it renders.

PricingCellCard

A flat PricingCard. Inside Pricing it follows the panel's 24px to 32px inner spacing; outside it has 32px spacing for a locally arranged panel.

Prop

Type

It also accepts the HTML attributes of the element it renders.

PricingCardAction

A slot at the top right of PricingCardHeader, beside the title, for a PricingCardBadge. It stays on the first row, beside PricingCardTitle.

It accepts the HTML attributes of the element it renders.

PricingCardBadge

The stock Badge, for a plan label, usually inside PricingCardAction.

Prop

Type

It also accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.

Dependencies

npm: @base-ui/react, cn. The CLI installs them for you.

Registry pieces it installs with it:

On this page