• Version 7.3.6
  • Published
  • 102 kB
  • 3 dependencies
  • MIT license


npm i rc-input-number
yarn add rc-input-number
pnpm add rc-input-number


React input-number component



variable InputNumber

const InputNumber: (<T extends ValueType = ValueType>(
props: InputNumberProps<T> & { children?: React.ReactNode } & {
ref?: React.Ref<HTMLInputElement>;
) => React.ReactElement) & { displayName?: string };


    interface InputNumberProps

    interface InputNumberProps<T extends ValueType = ValueType>
    extends Omit<
    'value' | 'defaultValue' | 'onInput' | 'onChange'
    > {}

      property className

      className?: string;

        property controls

        controls?: boolean;

          property decimalSeparator

          decimalSeparator?: string;
          • Syntactic sugar of formatter. Config decimal separator of display.

          property defaultValue

          defaultValue?: T;

            property downHandler

            downHandler?: React.ReactNode;

              property formatter

              formatter?: (
              value: T | undefined,
              info: {
              userTyping: boolean;
              input: string;
              ) => string;
              • Transform value to display value show in input

              property keyboard

              keyboard?: boolean;

                property max

                max?: T;

                  property min

                  min?: T;

                    property onChange

                    onChange?: (value: T) => void;

                      property onInput

                      onInput?: (text: string) => void;

                        property onPressEnter

                        onPressEnter?: React.KeyboardEventHandler<HTMLInputElement>;

                          property onStep

                          onStep?: (
                          value: T,
                          info: {
                          offset: ValueType;
                          type: 'up' | 'down';
                          ) => void;

                            property parser

                            parser?: (displayValue: string | undefined) => T;
                            • Parse display value to validate number

                            property precision

                            precision?: number;
                            • Syntactic sugar of formatter. Config precision of display.

                            property prefixCls

                            prefixCls?: string;

                              property step

                              step?: ValueType;

                                property stringMode

                                stringMode?: boolean;
                                • value will show as string

                                property style

                                style?: React.CSSProperties;

                                  property tabIndex

                                  tabIndex?: number;

                                    property upHandler

                                    upHandler?: React.ReactNode;

                                      property value

                                      value?: T;

                                        Package Files (2)

                                        Dependencies (3)

                                        Dev Dependencies (22)

                                        Peer Dependencies (2)


                                        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/rc-input-number.

                                        • Markdown
                                        • HTML
                                          <a href="https://www.jsdocs.io/package/rc-input-number"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>