Components

Pricing Table

An animated pricing table for React and Tailwind CSS: a monthly/yearly toggle with a gliding pill, prices that roll digit by digit without layout shift, a popular plan marked with a primary border and label, and feature lists with check icons. Fully data-driven and localized with Intl.NumberFormat.

  • Monthly / yearly toggle
  • Rolling digits
  • No width jitter
  • Data-driven
  • Intl currency
  • prefers-reduced-motion

Hobby

For side projects and experiments.

$0 per month

$0 billed yearly

  • 3 projects
  • Community components
  • Basic analytics

Pro

Most popular

For freelancers shipping client work.

$15 per month

$180 billed yearly

  • Unlimited projects
  • All 60+ components
  • Figma kit
  • Priority support

Team

For product teams with a design system.

$39 per month

$468 billed yearly

  • Everything in Pro
  • Up to 10 seats
  • Private registry
  • SSO & audit log

Installation

$ npx shadcn@latest add https://duskui.com/r/pricing-table.json

Uses the DuskUI Button for the call to action; the CLI installs it for you.

Usage

pricing.tsx
import { PricingTable, type PricingPlan } from "@/components/dusk/pricing-table/pricing-table"

const plans: PricingPlan[] = [
  {
    id: "pro",
    name: "Pro",
    price: { monthly: 19, yearly: 15 },
    features: ["Unlimited projects", "Priority support"],
    cta: { label: "Get Pro", href: "/signup?plan=pro" },
    popular: true,
  },
]

export function Pricing() {
  return <PricingTable plans={plans} />
}

Examples

Excluded features & custom price

Mark a feature included: false to show it muted with a dash (and a hidden “Not included” for screen readers). A text price such as "Custom" skips the roll, and a cta.href renders a link.

Startup

Best value

Everything to launch.

$99 per month

Billed monthly

  • 5 team members
  • 10k monthly events
  • Custom domains
  • Not included: Dedicated support
  • Not included: 99.99% uptime SLA

Enterprise

Scale, security and a human to call.

Custom

 

Contact sales
  • Unlimited members
  • Unlimited events
  • Custom domains
  • Dedicated support
  • 99.99% uptime SLA

Controlled & localized

Control the period with billing / onBillingChange, and pass currency, locale and labels to localize every string. Prices with different digit counts still never push the layout around.

Solo

12 € pro Monat

Monatliche Abrechnung

  • 1 seat
  • Unlimited exports
  • Email support

Studio

Most popular
1.290 € pro Monat

Monatliche Abrechnung

  • 25 seats
  • Brand libraries
  • Live collaboration

billing: monthly

API Reference

A plan is { id, name, description?, price, features, cta, popular?, badge? }. The root also accepts any <div> attribute.

PropTypeDefaultDescription
plansPricingPlan[]—Plans to render, in order.
plan.price{ monthly: number; yearly: number } | number | string—Per-month price for each period (yearly = monthly price when billed yearly), one number, or text like "Custom".
plan.features(string | { label; included? })[]—Feature list. included: false shows a muted dash.
plan.cta{ label; href?; onClick? }—Call to action. href renders the DuskUI Button as a link.
plan.popularboolean—Highlight with a 1px primary border and a label (plan.badge, default "Most popular").
billing"monthly" | "yearly"—Billing period (controlled).
defaultBilling"monthly" | "yearly""monthly"Initial period when uncontrolled.
onBillingChange(billing) => void—Called when the period changes.
showTogglebooleantrueShow the monthly / yearly switch.
currencystring"USD"ISO 4217 currency code.
localestring"en-US"BCP 47 locale for number formatting. Fixed by default to avoid hydration mismatches.
labelsPartial<PricingLabels>—Toggle, period, billing note and screen-reader strings.

Accessibility

  • The billing switch is a native radio group (role="radiogroup"), so arrow keys move between periods and screen readers announce the selection.
  • Each price has a plain-text copy, e.g. “$15 per month”, while the rolling digits are aria-hidden.
  • Each plan is an article labelled by its name; features are a list, and excluded features are prefixed with a hidden “Not included:”.
  • Digits use tabular-nums and the widest possible price is reserved, so toggling never shifts the layout.
  • With prefers-reduced-motion prices and the pill switch instantly.