NumberInputProps Interface

Properties for the NumberInput component

Extends

  • Omit<InputProps, "min" | "max" | "step" | "onChange">

Methods

Name Description
format(num: undefined | | number, formattedValue: string): string Optional function optional formatting function that takes the number value and the internal formatted value in case function just adds prefix or suffix.  
onChange(value: undefined | number, stringValue: string): void Optional Function to call when value is changed.  

Properties

Name Type Description
containerClassName undefined | string CSS class name for the NumberInput component container div  
containerStyle undefined | CSSProperties Style for component container div.  
max undefined | number number or function defaults to Number.MAX_SAFE_INTEGER  
min undefined | number number or function Number.MIN_SAFE_INTEGER  
parse undefined | (value: string) => undefined | | number    
precision undefined | number number of decimal places, defaults to 0  
ref undefined | Ref<HTMLInputElement> Provides ability to return reference to HTMLInputElement  
showTouchButtons undefined | boolean if true up/down buttons are shown larger and side by side  
snap undefined | boolean Set to true to "snap" to the closest step value while incrementing or decrementing (up/down buttons or arrow keys).  
step undefined | StepFunctionProp increment step value used while incrementing or decrementing (up/down buttons or arrow keys) defaults to 1.  
value undefined | number Numeric value, set to undefined to show placeholder text  

Defined in

Last Updated: 30 November, 2023