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.

Example

0 US dollars

Related components

Properties

NameDescriptionDefaultType
classNameAdditional CSS classes.string
currencyISOCodeThree letter currency shorthand ISO code. If not provided or invalid, component renders only the number.string
formattingOptionsOptions to define formatting.
{
  currency: 'symbol' | 'code' | 'name';
  fractionDigits: number;
  groupSeparators: boolean;
  negative: 'minus-sign' | 'parentheses';
  notation: 'standard' | 'compact';
}
refRef for the wrapping element.Ref<HTMLAnchorElement>
valueNumber value.
number |bigint