Skip to content

SiPhoneNumberInputComponent documentation

import { SiPhoneNumberInputComponent } from '@siemens/element-ng/phone-number';

Input Properties

Name Type Default Description
country
string | undefined

ISO_3166-2 Code of the selected country.

defaultCountry
string | undefined

ISO_3166-2 Code of the country which shall be used on form-control reset.

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 phone-number-input. Use this to reference the element containing the error message(s) for the phone-number-input. It will be picked by the SiFormItemComponent if the phone-number-input is used inside a form item.

Implements SiFormItemControl

id
string `__si-phone-number-input-${SiPhoneNumberInputComponent.idCounter++}`

Unique identifier.

Implements SiFormItemControl

labelledby
string `${this.id()}-label`

ID of the element that labels the phone number input.

Implements SiFormItemControl

phoneNumberAriaLabel
TranslatableString $localize`:@@SI_PHONE_NUMBER_INPUT.PHONE_NUMBER_INPUT_LABEL:Enter phone number`

Text for the phone number input aria-label attribute.

placeholderForSearch
TranslatableString $localize`:@@SI_PHONE_NUMBER_INPUT.SEARCH_PLACEHOLDER:Search`

Placeholder text for country search input.

readonly
boolean false

Whether the input can be focused but not edited.

scrollStrategy
ScrollStrategy defaultConnectedOverlayScrollStrategy()

Optional CDK scroll strategy used for the country selection overlay.

searchNoResultsFoundLabel
TranslatableString $localize`:@@SI_PHONE_NUMBER_INPUT.SEARCH_NO-RESULTS_FOUND:No results found`

Text shown when the country search returns no results.

selectCountryAriaLabel
TranslatableString $localize`:@@SI_PHONE_NUMBER_INPUT.SELECT_COUNTRY:Select country`

Text for the country dropdown aria-label attribute.

supportedCountries
readonly string[] | null | undefined

List of countries in ISO2 format, from which the user is allowed to select one. If no values are provided, the dropdown will show all known countries.

Output Properties

Name Type Description
countryChange
string | undefined

ISO_3166-2 Code of the selected country.

valueChange
PhoneDetails

Emits the selected country, formatted phone number, and its validity when the value changes.

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 { PhoneDetails } from '@siemens/element-ng/phone-number';

Describes the phone number, its validity and associated country information.

Properties

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

import type { CountryInfo } from '@siemens/element-ng/phone-number';

Describes the country information of the phone number.

Properties


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