Numeral
Locale-aware number formatting powered by Intl.NumberFormat.
Numeral formats a number with Intl.NumberFormat. It reads the active locale from React Aria's
I18nProvider and accepts the relevant typography props from Text.
Format
Numeral uses decimal formatting by default. It infers currency or unit formatting when currency
or unit is present. Set format to 'percent' or 'decimal', or when you want to make currency
and unit formatting explicit in the component call.
Compact notation
Set abbreviate for compact notation such as 12K. Pass "long" for a long display such as
12 thousand.
Precision
Pass a number for fixed fraction digits or a [min, max] tuple for a range. Use formatOptions for
other Intl.NumberFormat options.
Formatting rules
Numeral throws when:
- both
currencyandunitare provided. format="currency"is used without acurrencycode.format="unit"is used without aunitvalue.precisionis not a non-negative integer or valid[min, max]tuple.
Typography and alignment
Numerals use tabular figures and end alignment by default, so values remain readable in a column.
Set fontVariantNumeric, textAlign, or inherited Text typography props when the context needs a
different treatment.
Related components
Use Text for non-numeric content and Heading for section titles.