Component packs › Ledger › Currency Switch

Currency Switch

Change currency and every price turns to its local amount, adding or dropping digit columns as yen and rupee prices grow longer.

Currency Switch is a currency picker 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: local price lists, digit columns grow, locale formats.

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.

Currency Switch props

PropTypeDefaultDescription
plansstring[]
currenciesCurrencyPrices[]
valuestring
labelstring
darkboolean
onChange(code: string) => void
autoplaynumber | falseShowcase mode: moves to the next currency every N ms while visible.

Methods on the ref

Use it in React

import CurrencySwitch from './CurrencySwitch';

<CurrencySwitch />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Ledger

Good for: Pricing and payment.