Locale
The locale prop auto-detects thousand and decimal separators via Intl.NumberFormat. Grouping style is still controlled separately by thousandStyle.
Browser locale (auto-detect)
Pass locale={true} to detect both separators from the browser's current locale. Explicit thousandSeparator or decimalSeparator values always take priority over locale-detected ones.
Browser locale detection (yours en-US)
Both separators are resolved from your browser's locale setting
tsx
<NumoraInput locale={true} />Specific locale tag
Pass a BCP 47 locale tag to pin separators to a specific locale - useful for SSR or server-driven locale handling.
Specific locale (de-DE)
Separators pinned to German locale: '.' thousand, ',' decimal
tsx
<NumoraInput locale="de-DE" />getSeparatorsFromLocale
For pre-computing separators and passing them explicitly:
tsx
import { NumoraInput } from 'numora-react'
import { getSeparatorsFromLocale } from 'numora'
const { thousandSeparator, decimalSeparator } = getSeparatorsFromLocale('de-DE')
// → { thousandSeparator: '.', decimalSeparator: ',' }
getSeparatorsFromLocale('en-US')
// → { thousandSeparator: ',', decimalSeparator: '.' }
getSeparatorsFromLocale('fr-FR')
// → { thousandSeparator: '\u202f', decimalSeparator: ',' }
<NumoraInput thousandSeparator={thousandSeparator} decimalSeparator={decimalSeparator} />For decimal separator configuration without locale detection, see Decimals.