For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/components/headless-input-number.md.
v0.0.57
  • English
  • HeadlessInputNumber

    Headless@rockshin/tao-ui

    Headless 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

    $
    TSX

    Formatting and affixes

    $USD%
    TSX

    Locale separators and bounds

    units
    TSX

    Thousands separators

    Configure grouping and decimal separators and compare display with the emitted value.

    actual value: ""
    TSX

    Affix formatting

    Configure unit or currency affixes while the headless input handles numeric values.

    $USDactual value: ""
    TSX

    Percentage values

    Use a percent suffix and precision; define percentage conversion in application logic.

    %actual value: ""
    TSX

    Negative values

    Allow negative input and compare intermediate editing states with complete values.

    actual value: ""
    TSX

    Range limits

    Constrain accepted values with bounds and observe blur behavior.

    actual value: ""
    TSX

    Pad decimals on blur

    Pad decimal places to the configured precision when editing ends.

    actual value: ""
    TSX

    Localized separators

    Use a dot for grouping and a comma for decimal separation.

    actual value: ""
    TSX

    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.

    API

    HeadlessInputNumber

    PropertyDescriptionTypeDefault Value
    classNameAdditional css classstring | undefined-
    localeBCP 47 locale. Defaults to the provider's number locale.string | undefined-

    NumberInput

    PropertyDescriptionTypeDefault Value
    classNameAdditional css classstring | undefined-
    localeBCP 47 locale. Defaults to the provider's number locale.string | undefined-