Basic usage
Props
number | string
required
The monetary value to display. For large numbers (> 2^53), pass as string to maintain precision.When
valueInMinorUnits is true: 1299 → “$12.99”When valueInMinorUnits is false: 12.99 → “$12.99”string
default:"'USD'"
ISO 4217 currency code (e.g., ‘USD’, ‘EUR’, ‘JPY’, ‘GBP’).
boolean
default:"true"
Whether the value is in minor units (cents, paise, etc.). If true, the value will be converted based on the currency’s decimal places. If false, the value will be used as is.Examples:
- USD: 1299 → $12.99 (2 decimals)
- JPY: 1299 → ¥1,299 (0 decimals)
- BHD: 1299 → BHD 1.299 (3 decimals)
string
default:"'en-US'"
BCP 47 language tag for localization (e.g., ‘en-US’, ‘de-DE’, ‘ja-JP’, ‘fr-FR’).
boolean
default:"false"
Truncates decimal places when true.
'symbol' | 'code' | 'name'
default:"'symbol'"
Currency display format:
'symbol': $12.99'code': USD 12.99'name': 12.99 US Dollars
number
Number of minimum fraction digits. Uses currency’s default when undefined.
number
Number of maximum fraction digits. Uses currency’s default when undefined.
boolean
default:"true"
Group digits with thousand separators.