# SiNumberInputComponent documentation

**Kind:** component

**Selector:** `si-number-input`

```
import { SiNumberInputComponent } from '@siemens/element-ng/number-input';
```

```
component SiNumberInputComponent implements OnChanges, ControlValueAccessor, Validator, SiFormItemControl
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [aria-label](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L115-L115>) | `TranslatableString \| undefined` | `undefined` | The aria-label passed to the input |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L134-L134>) | `boolean` | `false` | Whether the input is disabled. |
| [errormessageId](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L162-L162>) | `string` | `` `${this.id()}-errormessage` `` | This ID will be bound to the `aria-describedby` attribute of the number-input. Use this to reference the element containing the error message(s) for the number-input. It will be picked by the [SiFormItemComponent](<../SiFormItemComponent/index.html#SiFormItemComponent>) if the number-input is used inside a form item.<br><br>Implements [SiFormItemControl](<index.html#t:SiFormItemControl>) |
| [inputId](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L124-L124>) | `string` | `` `__si-number-input-${SiNumberInputComponent.idCounter++}` `` | ID that is set on the input, e.g. for `<label for="...">` |
| [max](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L89-L93>) | `number` | `undefined` | The max. value for HTML input |
| [min](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L79-L83>) | `number` | `undefined` | The min. value for HTML input |
| [placeholder](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L145-L145>) | `TranslatableString \| undefined` |  | The placeholder for input field. |
| [readonly](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L140-L140>) | `boolean` | `false` | Whether the input can be focused but not edited. |
| [showButtons](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L109-L109>) | `boolean` | `true` | Show increment/decrement buttons? |
| [step](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L99-L99>) | `number \| "any"` | `1` | The step size for HTML input |
| [unit](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L103-L103>) | `string \| undefined` |  | Optional unit label |
| [value](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L101-L101>) | `number \| null \| undefined` |  | The value |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [valueChange](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L148-L148>) | `number \| undefined` | Emits the current value when the user changes it. |

#### Attributes and Methods

##### id

[Source for id](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L126-L126>)

**Modifiers:** readonly

**Type:** `Signal<string>`

**Default:** `computed(() => this.inputId())`

The actual id of the control that should be used in the `for` attribute of a label.

Implements [SiFormItemControl](<index.html#t:SiFormItemControl>)

##### inputElement

[Source for inputElement](<https://github.com/siemens/element/blob/main/projects/element-ng/number-input/si-number-input.component.ts#L150-L150>)

**Modifiers:** readonly

**Type:** `Signal<ElementRef<HTMLInputElement>>`

**Default:** `viewChild.required<ElementRef<HTMLInputElement>>('inputElement')`

### Types Documentation

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';
```

Represents a translatable string. This can either be a translation key, e.g. `ACTIONS.EDIT` that will be automatically translated when displayed on the UI or a pre-translated string, e.g. `Edit`. Equivalent to a normal string in usage and functionality.

```
type TranslatableString = string & Translatable
```

### [SiFormItemControl](<https://github.com/siemens/element/blob/main/projects/element-ng/form/si-form-item.control.ts#L14-L38>)

**Kind:** interface

```
import type { SiFormItemControl } from '@siemens/element-ng/form';
```

Common interface for form item controls. Controls that should be connected to [SiFormItemComponent](<../SiFormItemComponent/index.html#SiFormItemComponent>) must implement this interface and must be provided using the [SI\_FORM\_ITEM\_CONTROL](<../../types/SI_FORM_ITEM_CONTROL/index.html#t:SI_FORM_ITEM_CONTROL>) token.

```
interface SiFormItemControl
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [errormessageId](<https://github.com/siemens/element/blob/main/projects/element-ng/form/si-form-item.control.ts#L34-L34>) (readonly) | `string \| Signal<string>` | Generated ID that the [SiFormItemComponent](<../SiFormItemComponent/index.html#SiFormItemComponent>) will assign to the element containing the error messages. Implementations of [SiFormItemControl](<index.html#t:SiFormItemControl>) must generate this ID and assign it to the `aria-describedby` attribute of their focusable elements. |
| [id](<https://github.com/siemens/element/blob/main/projects/element-ng/form/si-form-item.control.ts#L16-L16>) (optional, readonly) | `string \| Signal<string \| undefined>` | The actual id of the control that should be used in the `for` attribute of a label. |
| [isFormCheck](<https://github.com/siemens/element/blob/main/projects/element-ng/form/si-form-item.control.ts#L37-L37>) (optional, readonly) | `boolean` | If the control is meant to be used a checkbox. This affects the label positioning. |
| [labelledby](<https://github.com/siemens/element/blob/main/projects/element-ng/form/si-form-item.control.ts#L27-L27>) (optional, readonly) | `string \| Signal<string \| undefined> \| null` | ID that should be assigned to the label element inside the [SiFormItemComponent](<../SiFormItemComponent/index.html#SiFormItemComponent>).<br><br>If the target control is not of type input, select or button, it cannot be referenced by a label. Instead, aria-labelledby must be used to create a reference to a label. In such a case, an implementation of [SiFormItemControl](<index.html#t:SiFormItemControl>) must provide the id of the label in [labelledby](<index.html#t:SiFormItemControl.labelledby>). [SiFormItemComponent](<../SiFormItemComponent/index.html#SiFormItemComponent>) will apply the id to the label so that it can be used inside the control to reference it in the aria-labelledby attribute. |
