Skip to main content

Numeric

Formats numeric values — including currencies, percentages, digital sizes, and humanized numbers — based on the US locale.

Default

Preview
Config
Value

The numeric value to display.

Type

Format type.

Precision

Fixed decimal precision.

Currency

Currency code when type is currency or currency-code.

Humanize

Human-readable shorthand.

Trim Fraction Zeros

Trim trailing zeros after applying precision.

Precision

[precision="2"]

Preview

Percent

[type="percent"]

Preview

Currency

[type="currency"] [type="currency-code"]

Preview

Humanize

[humanize="k"] [humanize="auto"]

Preview

Trim Fraction Zeros

[precision="2" trim-fraction-zeros="true"]

Preview

Digital

[type="digital"] [type="digital-binary"]

Preview

API

AttributeTypeDefaultDescription
valuenumberRequired. The value to display.
typenumber | percent | currency | currency-code | digital | digital-binarynumberFormat type.
precisionnumber0Fixed decimal precision.
trim-fraction-zerosbooleanfalseTrim trailing fraction zeros after applying precision.
currencystringEURCurrency code when type is currency or currency-code.
humanizeauto | k | m | b | tFormat to a human-readable shorthand.