HeadlessInputNumber
@rockshin/tao-uiHeadless numeric input primitives and hook for custom number entry experiences.
When to use
Use the headless API when tao-ui styling is not appropriate but number formatting behavior should stay consistent.
Recommended
- Use useNumberInput for fully custom rendering.
- Reuse the validation helpers for parity with the styled InputNumber.
Avoid
- Do not use the component outside its intended interaction model.
Examples
Basic usage
Formatting and affixes
Locale separators and bounds
Thousands separators
Configure grouping and decimal separators and compare display with the emitted value.
actual value: ""Affix formatting
Configure unit or currency affixes while the headless input handles numeric values.
actual value: ""Percentage values
Use a percent suffix and precision; define percentage conversion in application logic.
actual value: ""Negative values
Allow negative input and compare intermediate editing states with complete values.
actual value: ""Range limits
Constrain accepted values with bounds and observe blur behavior.
actual value: ""Pad decimals on blur
Pad decimal places to the configured precision when editing ends.
actual value: ""Localized separators
Use a dot for grouping and a comma for decimal separation.
actual value: ""Regional formatting
Regional grouping, decimal symbols and digits inherit TaoProvider.locale.numberLocale; set locale="fr-FR" on this component to override it. Explicit separators take precedence. Numeric input keeps canonical ASCII strings and precision while displaying localized digits.