INumberFormatProps
interface
NumberFormat
Props for `<OrigamNumberFormat>` — pure-display i18n number renderer powered by `Intl.NumberFormat` (zero external dep). The component owns NO state: it transforms `value` through the resolved `Intl` instance and emits the result into a `<tag>` element (default `<span>`). Consumers who want to override the rendering granularly use the scoped `#default` slot which exposes `{ formatted, parts, value }`.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
Inheritance
Extends
Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- valuerequirednumber | string
- Number to render. Strings are parsed via `Number()` — callers can pass a stringified BigInt-like to preserve precision before coercion (the actual formatting still goes through `Number`, so values beyond `Number.MAX_SAFE_INTEGER` may lose accuracy).
- formatTNumberFormatFormat
- High-level format dialect — see `TNumberFormatFormat`.
- localeTNumberFormatLocale
- BCP-47 locale tag (or array, for fallback chains). The literal string `'auto'` triggers the runtime resolution chain (`<html lang>` → `navigator.language` → `'en-US'`).
- currencystring
- ISO 4217 currency code. Required when `format === 'currency'`; we fall back to `'USD'` rather than throwing so storybook controls remain forgiving.
- currencyDisplayTNumberFormatCurrencyDisplay
- Currency-symbol rendering — `'symbol'` (`$`), `'narrowSymbol'` (`$` instead of `US$`), `'code'` (`USD`) or `'name'` (`US dollar`).
- unitstring
- Sanctioned unit identifier (e.g. `'kilometer-per-hour'`, `'celsius'`, `'liter'`). Required when `format === 'unit'`. The full ECMAScript-sanctioned list is exposed under `Intl.supportedValuesOf('unit')` at runtime.
- unitDisplayTNumberFormatUnitDisplay
- Unit-label rendering — `'short'` (`km/h`), `'long'` (`kilometers per hour`) or `'narrow'` (`kph`).
- notationTNumberFormatNotation
- Raw `notation` override. Auto-set to `'compact'` when `format === 'compact'`, to `'scientific'` / `'engineering'` for the matching formats. Explicit values still win — useful for `format: 'decimal'` with `notation: 'scientific'`.
- compactDisplayTNumberFormatCompactDisplay
- Compact-notation rendering — `'short'` (`1M`) or `'long'` (`1 million`). Only honoured when `notation === 'compact'`.
- minimumFractionDigitsnumber
- Minimum digits after the decimal point.
- maximumFractionDigitsnumber
- Maximum digits after the decimal point.
- minimumSignificantDigitsnumber
- Minimum significant digits (mutually exclusive with fraction digits).
- maximumSignificantDigitsnumber
- Maximum significant digits (mutually exclusive with fraction digits).
- useGroupingTNumberFormatUseGrouping
- Thousands-separator behaviour. `true` / `'auto'` keep the locale default, `false` removes them, `'always'` forces them on, `'min2'` only renders them when the integer part has at least 2 groups.
- signDisplayTNumberFormatSignDisplay
- Sign-display strategy. `'auto'` (default — only negatives), `'always'`, `'except-zero'`, `'negative'`, `'never'`.