number custom element renders a numeric input with optional prefix/suffix adornments, decimal precision, and range checks. Use it for merchant-defined quantities, monetary amounts, or rates.
Factory
Example
Options
NumberAdornment
'inset'overlays the adornment inside the input chrome. Best for short symbols ($,%).'tab'renders the adornment as a separate chip glued to one edge of the input. Best for short text labels (USD,kg).
Mode, precision, and range
mode: 'integer'allows digits and a leading-only.mode: 'decimal'also allows a single..precisioncaps decimal places while typing. Values past the cap are blocked; adefaultValuebeyond the cap is truncated at mount.minandmaxrun at submit time unlessvalidateis set.
Value
null while the input is empty or mid-typing an incomplete number (for example '-' or '1.').