| Name | Description | Default | Type |
|---|---|---|---|
className | Additional CSS classes. | | string |
currencyISOCode | Three letter currency shorthand ISO code. If not provided or invalid, component renders only the number. | | string |
formattingOptions | Options to define formatting. | | { currency: 'symbol' | 'code' | 'name'; fractionDigits: number; groupSeparators: boolean; negative: 'minus-sign' | 'parentheses'; notation: 'standard' | 'compact';} |
ref | Ref for the wrapping element. | | Ref<HTMLAnchorElement> |
value | Number value. | | number |bigint |
CurrencyDisplay
core package3.2.2
Note: All components shown on this site are supported by the Constellation design system. To learn how to configure Theme Cosmos, visit Pega Community.
The CurrencyDisplay component renders data in an auto-formatted monetary value based on a selected currency.
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.