PricingCard

One plan card. Price rolls with billing, features tick in on scroll, the featured card sits on grainy mesh. Pricing.

Open playground

Starter

For side projects

12

  • 3 projects
  • Community support
  • Basic analytics

Studio

For growing teams

Most popular

39

  • Unlimited projects
  • Priority support
  • Advanced analytics

About

PricingCard 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 { PricingCard } from "@ashutoshswamy/smoui" and set name, monthly, billing among its 6 props.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { PricingCard, BillingToggle } from "@ashutoshswamy/smoui";

<PricingCard
  featured
  badge="Most popular"
  name="Studio"
  monthly={39}
  yearly={31}
  billing={billing}
  features={["Unlimited projects", "Priority support"]}
  onSelect={checkout}
/>

Props 6

name / description

Plan heading.

string
monthly / yearly

Per-month price. yearly is the per-month price when billed yearly.

number
billing

Which price to show. Pair with BillingToggle.

"monthly""yearly"default "monthly"
features

Feature list.

string[]
featured / palette / badge

Mesh background, mesh colors 0-7, corner badge.

boolean / number / string
cta / onSelect

Button label and handler.

string / () => void