INumberFormatProps
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
Définition
La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.
Héritage
Hérite de
Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.
API
Propriétés
Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.
- valuerequisnumber | 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'`.