InputNumber
@rockshin/tao-uiA styled numeric input built on tao-ui number formatting and validation behavior.
When to use
Use InputNumber for numeric values that need min, max, step, precision, or formatted display.
Recommended
- Set min and max when the domain is bounded.
- Use the headless API when custom rendering is required.
Avoid
- Do not use a numeric input for identifiers such as account numbers.
Examples
Basic usage
Currency and percentage
Sizes, variants, and bounds
Currency formatting
Thousands separators, decimals, and a prefix format display while retaining a usable value.
actual value: "150000"Prefix and suffix
Use affixes for units instead of storing them in the numeric value.
actual value: ""Three sizes
Compare three control sizes with the same numeric behavior.
Visual variants
Keep the same controlled input behavior across visual variants.
Percentages
Set decimal precision and a percent suffix; this example does not convert between percentages and fractions.
actual value: ""Numeric bounds
Set the accepted range and observe the value during editing and on blur.
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.