Input-Number

Input-Number UI Component

Demo

API

Props

PropertyDescriptionTypeDefault
autoFocusGet focus when component mountedbooleanfalse
decimalSeparatorDecimal separatorstring-
defaultValueInitial valuenumber
descriptionInput descriptionstring-
disabledDisable the inputbooleanfalse
errorTextError message, if provided input will be set in error statestring-
formatterSpecifies the format of the value presented(value: number / string) => string-
labelInput labelstring-
maxMax valuenumberInfinity
minMin valuenumber-Infinity
onChangeThe callback triggered when the value is changed.(value: number / string) => void
onPressEnterThe callback function that is triggered when Enter key is pressed.(e:Event) => void
parserSpecifies the value extracted from formatter(val: number / string) => string-
precisionPrecision of input valuenumber-
sizeHeight of input boxstring-
stepThe number to which the current value is increased or decreased. It can be an integer or decimal.number / string1
valueCurrent valuenumber-
prefixelString or ReactNode to set prefixstring / ReactNode-
suffixelString or ReactNode to set suffixstring / ReactNode-

Methods

NameDescription
blur()remove focus
focus()get focus