Component packs › Ledger › Billing Toggle
Switch to yearly and the price turns down on its digit wheels while the year's saving drops onto the card as a stack of coins, one at a time.
Billing Toggle is a pricing toggle from Ledger, a component pack with 6 pricing components: Pricing controls where every number turns on its own digit wheel and savings are a stack of coins. Price: $2 for the whole pack.
Built with: digit wheels, coin stack, computed saving.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
monthly | number | 24 | Price per month when paid monthly, in whole units. Default 24. |
yearly | number | 240 (two months free) | Price for a year when paid yearly. Default 240 (two months free). |
currency | string | ||
plan | string | ||
value | 'monthly' | 'yearly' | ||
coin | number | 8 | Coin value for the savings stack. Default 8. |
dark | boolean | ||
onChange | (period: 'monthly' | 'yearly') => void | ||
autoplay | number | false | Showcase mode: switches every N ms while visible. |
readonly value: 'monthly' | 'yearly'set(p: 'monthly' | 'yearly'): voiddestroy(): voidimport BillingToggle from './BillingToggle';
<BillingToggle />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Pricing and payment.