Name | Type | Default | Description |
---|---|---|---|
alwaysShowISOCode | boolean | false
| Always show ISO code |
className | string |
| Additional CSS classes. |
currencyISOCode | string |
| Three letter currency shorthand ISO code. If not provided or invalid, component renders as number |
formattingOptions | { showDecimal: undefined | false | true; showGroupSeparators: undefined | false | true; } |
| |
ref | Ref<HTMLAnchorElement> |
| Ref for the wrapping element. |
value | string |
| Number value |
CurrencyDisplay
The CurrencyDisplay component renders data in an auto-formatted monetary value based on a selected currency.
For more information on how to use the features and props for this component, check out the developer documentation.
Usage
The CurrencyDisplay component can be used to display a value that matches a particular currency, such as pounds sterling, euros, dollars, etc., according to locale. You can configure the locale of your application via the Configuration component.
There are a variety of formatting options for the CurrencyDisplay component that enable you to show decimals, show group separators, and show the currency symbol. The component displays "--" in the case of an undefined value.