# inputnumber

```ts
import { InputNumberModule } from '@anguless/angulux/inputnumber';
```

## InputNumber

`agl-inputNumber, agl-inputnumber, agl-input-number` — component

Inherits every input, output and slot of `BaseInput` — see [baseinput.md](baseinput.md).

InputNumber is an input component to provide numerical input.

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `showButtons` | `boolean` | _not documented_ | Displays spinner buttons. |
| `format` | `boolean` | _not documented_ | Whether to format the value. |
| `buttonLayout` | `string` | _not documented_ | Layout of the buttons, valid values are "stacked" (default), "horizontal" and "vertical". |
| `inputId` | `string \| undefined` | _not documented_ | Identifier of the focus input to match a label defined for the component. |
| `styleClass` | `string \| undefined` | _not documented_ | Style class of the component. **Deprecated:** since v20.0.0, use `class` instead. |
| `placeholder` | `string \| undefined` | _not documented_ | Advisory information to display on input. |
| `tabindex` | `number \| undefined` | _not documented_ | Specifies tab order of the element. |
| `title` | `string \| undefined` | _not documented_ | Title text of the input text. |
| `ariaLabelledBy` | `string \| undefined` | _not documented_ | Specifies one or more IDs in the DOM that labels the input field. |
| `ariaDescribedBy` | `string \| undefined` | _not documented_ | Specifies one or more IDs in the DOM that describes the input field. |
| `ariaLabel` | `string \| undefined` | _not documented_ | Used to define a string that labels the input element. |
| `ariaRequired` | `boolean \| undefined` | _not documented_ | Used to indicate that user input is required on an element before a form can be submitted. |
| `autocomplete` | `string \| undefined` | _not documented_ | Used to define a string that autocomplete attribute the current element. |
| `incrementButtonClass` | `string \| undefined` | _not documented_ | Style class of the increment button. |
| `decrementButtonClass` | `string \| undefined` | _not documented_ | Style class of the decrement button. |
| `incrementButtonIcon` | `string \| undefined` | _not documented_ | Style class of the increment button. |
| `decrementButtonIcon` | `string \| undefined` | _not documented_ | Style class of the decrement button. |
| `readonly` | `boolean \| undefined` | _not documented_ | When present, it specifies that an input field is read-only. |
| `allowEmpty` | `boolean` | _not documented_ | Determines whether the input field is empty. |
| `locale` | `string \| undefined` | _not documented_ | Locale to be used in formatting. |
| `localeMatcher` | `any` | _not documented_ | The locale matching algorithm to use. Possible values are "lookup" and "best fit"; the default is "best fit". See Locale Negotiation for details. |
| `mode` | `string \| any` | _not documented_ | Defines the behavior of the component, valid values are "decimal" and "currency". |
| `currency` | `string \| undefined` | _not documented_ | The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB. There is no default value; if the style is "currency", the currency property must be provided. |
| `currencyDisplay` | `string \| undefined \| any` | _not documented_ | How to display the currency in currency formatting. Possible values are "symbol" to use a localized currency symbol such as €, ü"code" to use the ISO currency code, "name" to use a localized currency name such as "dollar"; the default is "symbol". |
| `useGrouping` | `boolean` | _not documented_ | Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. |
| `minFractionDigits` | `number \| undefined` | _not documented_ | The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the ISO 4217 currency code list (2 if the list doesn't provide that information). |
| `maxFractionDigits` | `number \| undefined` | _not documented_ | The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the ISO 4217 currency code list (2 if the list doesn't provide that information). |
| `prefix` | `string \| undefined` | _not documented_ | Text to display before the value. |
| `suffix` | `string \| undefined` | _not documented_ | Text to display after the value. |
| `inputStyle` | `any` | _not documented_ | Inline style of the input field. |
| `inputStyleClass` | `string \| undefined` | _not documented_ | Style class of the input field. |
| `showClear` | `boolean` | _not documented_ | When enabled, a clear icon is displayed to clear the value. |
| `autofocus` | `boolean \| undefined` | _not documented_ | When present, it specifies that the component should automatically get focus on load. |

| Output | Type | Description |
| --- | --- | --- |
| `onInput` | `EventEmitter<InputNumberInputEvent>` | Callback to invoke on input. |
| `onFocus` | `EventEmitter<Event>` | Callback to invoke when the component receives focus. |
| `onBlur` | `EventEmitter<Event>` | Callback to invoke when the component loses focus. |
| `onKeyDown` | `EventEmitter<KeyboardEvent>` | Callback to invoke on input key press. |
| `onClear` | `EventEmitter<void>` | Callback to invoke when clear token is clicked. |

| Slot | Read as | Description |
| --- | --- | --- |
| `<ng-template #clearicon>` | `clearIconTemplate` | Custom clear icon template. |
| `<ng-template #incrementbuttonicon>` | `incrementButtonIconTemplate` | Custom increment button icon template. |
| `<ng-template #decrementbuttonicon>` | `decrementButtonIconTemplate` | Custom decrement button icon template. |
