NumberDisplay

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 NumberDisplay component renders data as an auto-formatted number, according to locale.

Usage

The NumberDisplay component can be used to display a numerical value that can include a unit. The component displays "--" in the case of an undefined value.

There are a variety of formatting options for the NumberDisplay component that enable you to show decimals, show group separators, and limit the number of decimals shown. The group separators used depend on your application's locale. You can configure the locale of your application via the Configuration component.

Example

0

Related components

Properties

NameDescriptionDefaultType
classNameAdditional CSS classes.string
formattingOptions
{
  fractionDigits: number;
  groupSeparators: boolean;
  notation: 'standard' | 'compact';
}
refRef for the wrapping element.Ref<HTMLSpanElement>
unitUnit to be included in the text, for example '%'string
valueNumber value
number |bigint