Luke UI
ComponentsTypography

Numeral

Locale-aware number formatting powered by Intl.NumberFormat.

Numeral formats numbers with Intl.NumberFormat. It respects locale from React Aria's I18nProvider.

Numeral — Basic
12,345.67

Formats

Numeral infers format from currency or unit when omitted. Pass format explicitly for 'percent' or 'decimal', or when you want to be direct about currency and unit formatting.

Numeral — Formats
350,000%A$98.7698km/h12,345

Compact notation

Use abbreviate for compact notation.

Numeral — Compact notation
12K12 thousand

Precision

Pass a number for fixed fraction digits, or a [min, max] tuple for a range.

Numeral — Precision
98.771,234.57

Constraints

Numeral throws in development when:

  • both currency and unit are provided.
  • format="currency" is used without a currency code.
  • format="unit" is used without a unit value.
  • precision is not a non-negative integer or valid [min, max] tuple.

Props

Prop

Type