Pastel card pricing grid with animated billing toggle, tag badges, info rows, and spring-animated sliding prices.
Installation
Usage
Starting with yearly billing
How It Works
- Each plan card gets a pastel background (
pastelBg) and matchingBadgevariant (pastelBadgeVariant) derived from the plan'spastelcolor. - The price display uses the same
SlidingNumber/Digit/Slotspring animation system as Pricing 1 — digits animate individually viauseSpringanduseTransformfrommotion/react. BillingToggleis a custom accessible switch (role="switch",aria-checked) that animates its thumb with a spring.- When
monthly/yearlyis"Custom", the price row renders the string "Custom" instead of the animated number. - When the price is
0, it renders "Free".
API Reference
Pricing4
| Prop | Type | Default |
|---|---|---|
plans? | Plan4[] | DEFAULT_PLANS |
label? | string | "Pricing Plans" |
yearlyLabel? | string | "Billed yearly (18% OFF)" |
defaultYearly? | boolean | false |
Plan4
| Prop | Type | Default |
|---|---|---|
id? | string | - |
name? | string | - |
description? | string | - |
tags? | string[] | - |
targetedFor? | string | - |
credits? | string | - |
monthly? | number | "Custom" | - |
yearly? | number | "Custom" | - |
ctaLabel? | string | - |
ctaHref? | string | - |
pastel? | "rose" | "amber" | "sky" | "violet" | "emerald" | "lime" | - |