# Class NumericSpinner

A numeric spinner widget with standard styling.

## Index

### Methods

- build
- getElement
- getFloatValue
- getIntValue
- getValue
- reset
- setValue

### Constructors

- constructor

## Methods

### build

- build(): HTMLElement

- - Defined in ui/FormWidgets/NumericSpinner.ts :101

  Gets the element on which the numeric spinner is bound.

  #### Returns HTMLElement

  The numeric spinner element.

### getElement

- getElement(): HTMLElement

- - Defined in ui/FormWidgets/NumericSpinner.ts :51

  Gets the element on which the numeric spinner is bound.

  #### Returns HTMLElement

  The numeric spinner element.

### getFloatValue

- getFloatValue(): number

- - Defined in ui/FormWidgets/NumericSpinner.ts :75

  Gets the numeric spinner currently selected value (as a float).

  #### Returns number

  The numeric spinner value.

### getIntValue

- getIntValue(): number

- - Defined in ui/FormWidgets/NumericSpinner.ts :67

  Gets the numeric spinner currently selected value (as an integer).

  #### Returns number

  The numeric spinner value.

### getValue

- getValue(): string

- - Defined in ui/FormWidgets/NumericSpinner.ts :59

  Gets the numeric spinner currently selected value (as a string).

  #### Returns string

  The numeric spinner value.

### reset

- reset(): void

- - Defined in ui/FormWidgets/NumericSpinner.ts :42

  Resets the numeric spinner.

  #### Returns void

### setValue

- setValue(value: number): void

- - Defined in ui/FormWidgets/NumericSpinner.ts :86

  Sets the numeric spinner value.

  #### Parameters

  - ##### value: number

    The value to set the numeric spinner to. If `value` is greater than [`max`]{@link NumericSpinner.max}, this method sets the numeric spinner to its maximum value instead. Likewise, if value is lesser than [`min`]{@link NumericSpinner.min}, the method sets the numeric spinner to its minimum value.

  #### Returns void

## Constructors

### constructor

- new NumericSpinner(onChange?: function, min?: number, max?: number, label?: string): NumericSpinner

- - Defined in ui/FormWidgets/NumericSpinner.ts :19

  Creates a new `NumericSpinner`.

  #### Parameters

  - ##### Default value onChange: function = (numericSpinner: NumericSpinner) => {}

    The function to call when the numeric spinner value changes. This function takes the current `NumericSpinner` instance as an argument.

    - - (numericSpinner: NumericSpinner): void

      - #### Parameters

        - ##### numericSpinner: NumericSpinner

        #### Returns void

  - ##### Default value min: number = 0

    The minimum possible value of the numeric spinner.

  - ##### Optional max: number

    The maximum possible value of the numeric spinner.

  - ##### Optional label: string

    The label to use for the input for accessibility purposes.

  #### Returns NumericSpinner

### Hierarchy

- NumericSpinner

### Implements

- IFormWidget
- IFormWidgetSettable