PricingTable

Plans with a monthly/yearly switch. Prices roll to their new value; one highlight stretches between plans. Pricing.

Open playground

Starter

For trying things out

0

  • 1 project
  • Community support

Pro

For solo makers

19

  • Unlimited projects
  • Priority support
  • Custom domains

Team

For small studios

49

  • Everything in Pro
  • Shared workspace
  • Roles

About

PricingTable is a React component in the Pricing category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { PricingTable } from "@ashutoshswamy/smoui" and set plans, featured, currency.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { PricingTable } from "@ashutoshswamy/smoui";

<PricingTable
  featured={1}
  plans={[
    { name: "Starter", monthly: 0, features: ["1 project"] },
    { name: "Pro", monthly: 19, yearly: 15, features: ["Unlimited projects"], onSelect: checkout },
  ]}
/>

Props 3

plans

Plans. `yearly` is the per-month price when billed yearly.

{ name: string; description?: string; monthly: number; yearly?: number; features: string[]; cta?: string; onSelect?: () => void }[]
featured

Index of the plan that holds the highlight until you hover another.

numberdefault 0
currency

Symbol before the price.

stringdefault "$"