ComponentsProNew

Pricing Toggle

Plan cards with a monthly or yearly switch. A white pill glides between the options and the prices roll in again on a spring.

Customize

accentColor
secondaryColor
glowColor

Based on Pricing (MIT license) ยท Terms of use

Props

15 properties
PropertyTypeDefaultDescription
plans{ name; description; monthlyPrice; annualPrice; features: string[]; href?; featured? }[]โ€”Plans: name, description, two prices, features, link and a popular flag.
defaultCycle'monthly' | 'annual'"monthly"Billing period selected at first.
currencystring"$"Currency sign.
monthlyLabelstring"Monthly"Label of the monthly switch.
annualLabelstring"Annual"Label of the annual switch.
monthlySuffixstring"/month"Text after the monthly price.
annualSuffixstring"/year"Text after the annual price.
annualNotestring""Small badge next to the switch, such as "Save 20%". Hidden when empty.
ctaLabelstring"Get started"Card button text.
featuredLabelstring"Popular"Badge on the featured plan.
priceStiffnessnumber100Stiffness of the spring that drops the new price in.
accentColorstring"#ffffff"Main colour: the switch, checks, and the featured plan's badge, border and button. Text on the fill turns dark or white to stay readable.
secondaryColorstring"#a3a3a3"Second colour: the far corner of the featured plan's tint.
glowColorstring"rgba(255, 255, 255, 0.1)"Soft glow around the featured plan.
classNamestringโ€”Extra classes.

Dependencies

4 required packages

npm install motion lucide-react clsx tailwind-merge

Related components

View all