@hmiproject/helio-sdk
    Preparing search index...

    Function NumberInput

    • Component that displays a numeric input field using the currently active HELIO theme.

      Parameters

      • props: {
            autoFocus?: boolean;
            defaultValue?: number;
            disabled?: boolean;
            format?: NumberFormatOptions;
            invalid?: boolean;
            leftItems?: ReactNode;
            placeholder?: string;
            range?: { max?: number; min?: number };
            readOnly?: boolean;
            rightItems?: ReactNode;
            showStepper?: boolean;
            stepSize?: number;
            style?: CSSProperties;
            unit?: string;
            value?: number;
            onBlur?(event: FocusEvent): void;
            onChange(nextValue: number): void;
            onFocus?(event: FocusEvent): void;
        }
        • OptionalautoFocus?: boolean
        • OptionaldefaultValue?: number

          Default value of the input if using as an "uncontrolled" component.

          If this prop changes over time, the field will not be updated.

        • Optionaldisabled?: boolean
        • Optionalformat?: NumberFormatOptions

          Formatting options for displaying the value.

          Values will automatically be formatted using the currently active locale.

        • Optionalinvalid?: boolean
        • OptionalleftItems?: ReactNode
        • Optionalplaceholder?: string

          Placeholder text that will be displayed while the field has no value.

        • Optionalrange?: { max?: number; min?: number }
        • OptionalreadOnly?: boolean
        • OptionalrightItems?: ReactNode
        • OptionalshowStepper?: boolean

          Whether to show increment/decrement buttons

        • OptionalstepSize?: number

          Integer step size

        • Optionalstyle?: CSSProperties
        • Optionalunit?: string

          Unit information displayed next to the current value

        • Optionalvalue?: number

          Current value of the input if using a "controlled" component

          If this prop changes over time, the field will be updated.

        • onBlur?: function
          • Called when the input loses focus.

            Parameters

            • event: FocusEvent

            Returns void

        • onChange: function
          • Called with the new input value when the value is changed by the user.

            Parameters

            • nextValue: number

            Returns void

        • onFocus?: function
          • Called when the input receives focus.

            Parameters

            • event: FocusEvent

            Returns void

      Returns Element

      1.0.0