Skip to main content

NumberInput

Interfaces

NumberInputProps

Properties

PropertyTypeDescriptionDefined in
max?numberThe maximal accepted number.manager/components/NumberInput.tsx:11
min?numberThe minimal accepted number.manager/components/NumberInput.tsx:9
onChange(value: number) => voidThe callback on value change.manager/components/NumberInput.tsx:7
valuenumberThe controlled number input value.manager/components/NumberInput.tsx:5
width?stringThe widget of the number input area.manager/components/NumberInput.tsx:13

Functions

default()

default(__namedParameters): Element

A simple number input component.

Compared with the feature-rich number input components from libraries like Material UI and Ant Design, this component is not for general use but designed only for specific use cases in this project.

The component is controlled, meaning that the value is passed in as a prop and the parent component is responsible for updating it. The component is also functional, such that it has the increment/decrement buttons, accepts keyboard input, reacts to up/down keys and the scroll wheel, etc.

Parameters

ParameterType
__namedParametersNumberInputProps

Returns

Element

Defined in

manager/components/NumberInput.tsx:28