Skip to content

SiNumberInputComponent documentation

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

Input Properties

NameTypeDefaultDescription
aria-label
TranslatableString | undefined undefined

The aria-label passed to the input

disabled
boolean false

Whether the input is disabled.

errormessageId
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 if the number-input is used inside a form item.

Implements SiFormItemControl

inputId
string `__si-number-input-${SiNumberInputComponent.idCounter++}`

ID that is set on the input, e.g. for <label for="...">

max
number undefined

The max. value for HTML input

min
number undefined

The min. value for HTML input

placeholder
TranslatableString | undefined

The placeholder for input field.

readonly
boolean false

Whether the input can be focused but not edited.

showButtons
boolean true

Show increment/decrement buttons?

step
number | "any" 1

The step size for HTML input

unit
string | undefined

Optional unit label

value
number | null | undefined

The value

Output Properties

NameTypeDescription
valueChange
number | undefined

Emits the current value when the user changes it.

Attributes and Methods

NameTypeDefaultDescription
(readonly) id
Signal<string> computed(() => this.inputId())

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

Implements SiFormItemControl

(readonly) inputElement
Signal<ElementRef<HTMLInputElement>> viewChild.required<ElementRef<HTMLInputElement>>('inputElement')

Types Documentation

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.

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

Common interface for form item controls. Controls that should be connected to SiFormItemComponent must implement this interface and must be provided using the SI_FORM_ITEM_CONTROL token.

Properties

Except where otherwise noted, content on this site is licensed under MIT License.