Hex Core JS
    Preparing search index...

    Type Alias NumberInputProps

    NumberInputProps: {
        autoFocus?: boolean;
        disabled?: boolean;
        format?: (value: NumberFieldValue) => string;
        id?: string;
        invalid?: boolean;
        name?: string;
        onBlur?: () => void;
        onFocus?: () => void;
        placeholder?: string;
        setValue: SetStateFunction<NumberFieldValue>;
        sideEffect?: (v: NumberFieldValue) => void;
        step?: number;
        unit?: number;
        value: NumberFieldValue;
    } & Pick<InputProps, "before" | "after" | "gap"> & Partial<
        ClassNameProps & StyleProps,
    >

    Type Declaration

    • OptionalautoFocus?: boolean

      Indicates if the input should be auto-focused.

    • Optionaldisabled?: boolean

      Indicates if the input is disabled.

    • Optionalformat?: (value: NumberFieldValue) => string

      A function to format the value into a standardized format. Only updates the value in the input on mount and blur.

    • Optionalid?: string

      The ID of the input.

    • Optionalinvalid?: boolean

      Indicates if the input is invalid.

    • Optionalname?: string

      The name of the input.

    • OptionalonBlur?: () => void

      A callback function to call when focus is removed from the input.

    • OptionalonFocus?: () => void

      A callback function to call when the input becomes focused.

    • Optionalplaceholder?: string

      Placeholder text to display when the value is blank.

    • setValue: SetStateFunction<NumberFieldValue>

      A callback function to update the input value when a change happens.

    • OptionalsideEffect?: (v: NumberFieldValue) => void

      A side effect function to call when the value changes as a result of user interaction with this input, and not external updates to the field value.

    • Optionalstep?: number

      The stepping interval when using the arrow keys (up/down) to increment/decrement the value. Note that holding the shift key uses a step of ten times the given step.

    • Optionalunit?: number

      The underlying unit of the field. Can be used, for example, to enter values in the tenths, dozens, hundreds (e.g. to display as dollars but underlying value is cents), thousands, or millions.

    • value: NumberFieldValue

      The value of the input.