Component packs › Ledger › Usage Calculator
Move the sliders and every line of the bill turns on its wheels, the total follows, and the bar re-divides into plan, requests and storage.
Usage Calculator is a pricing calculator 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: metered pricing, free allowances, cost bar.
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 |
|---|---|---|---|
pricing | UsagePricing | ||
calls | number | ||
gb | number | ||
currency | string | ||
label | string | ||
dark | boolean | ||
onChange | (total: number, parts: { base: number; calls: number; storage: number }) => void | ||
autoplay | number | false | Showcase mode: tries a new usage every N ms while visible. |
set(calls: number, gb: number): voiddestroy(): voidimport UsageCalculator from './UsageCalculator';
<UsageCalculator />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Pricing and payment.