Calm motion: animations on this site only fade, with no movement
Currency converter
An amount in one currency and its value in another
Converts money for a travel, shop, or bank app. You give the rates, and the component does the math and the formats. It fetches nothing.
Basic
$1.00 = IDR 16,250 · Rates of 16 Nov 2026, 09:00
ratesmaps each ISO 4217 code to its units for one unit of a common base. For example,{ USD: 1, IDR: 16250 }means 16,250 rupiah for one dollar. The menus list these codes with the name of each currency in thelocale.v-model:amount,v-model:from, andv-model:tohold the amount and the two currencies. The ⇄ button swaps the currencies.- The result is an
outputelement, so screen readers hear each new value. Under it, a line shows the rate for one unit, such as "$1.00 = IDR 16,250". updatedis the time of the rates, as text. It shows after the rate line.- Each currency uses its own number of decimals, such as 0 for IDR and 2 for USD. The number is the same in every browser and on the server.
- Change the words with
labelsor a label pack:amount,from,to,swap,result, andupdated(a function).
Usage
ts
import { BlessCurrencyConverter } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
rates* | Record<string, number> | — | units of each currency for one unit of a common base, for example `{ USD: 1, IDR: 16250 }` |
locale | string | "en" | |
updated | string | — | when the rates were last updated, as text |
labels | Partial<{ amount: string; from: string; to: string; swap: string; result: string; updated: (when: string) => string; }> | — | |
amount | number | 1 | |
from | string | "USD" | |
to | string | "EUR" |
Events
| Name | Payload | Description |
|---|---|---|
update:amount | [value: number] | |
update:from | [value: string] | |
update:to | [value: string] |