Skip to content

Language selector

...

Implementations

The component LanguageSelector is available in the following technologies:

Web Components
webreactvueangular

Parameters

Parameters

Make sure you have read about the parameters in here.

The parametrization of the component can be done with the following custom params or properties:

NameTypeSlotDescription
configstring

The main parameter has two components following the pattern: <shape><?:size>.

  • shape: (optional) Establishes the styling of the input. Default value is shaped, assumed if nothing is specified. Possible values are: shaped or line.

    ts
    export type ZInput_Type = 'shaped' | 'line';
  • size: (optional) defines de size of the input. The default value is m, being omitted from the param. The possible values are: m or l.

    ts
    export type ZInput_Size = 'm' | 'l';
labelstringLabel of the input
placeholderstringPlaceholder of the input
readonlybooleanPrevents the user from changing the value
autocompletestringAutomated assistance in filling out form field values
modelstring

Value of the model

disabledboolean

Blocks the interaction with the input component by using the disabled attribute of the HTML input element.

requiredboolean

Marks the input component as required. If and interaction is made with the input and the value is nullable or empty, the input will be marked as invalid as using the invalid attribute.

namestring

Identification for the field inside the form.

help-textstring

The forced message to be shown under the input. It is used to give more information about the input, or a message to the user, specially when the input is invalid.

invalidboolean

The attribute that forces the state of the input as invalid.

localestring

The locale parameter is used to set the locale of the component. The value must be part of the registered locales in ZDS. If not set, the default locale of the document will be used.

Have a look to the localization mechanisms.

search-in-options-textstringThe text to display when searching in the options
options-not-found-textstringThe text to display when no options are found
with-searchbooleanIf true, a search input will be displayed in the dropdown
search-autofocusstringIf true, the search input will be focused when the dropdown is opened
localesstringThe list of locales to display in the dropdown
customobject

A record of key-value pairs to set the CSS custom tokens. It's a complex attribute set as an JS object in stringified JSON format.

Example:

html
<z-language-selector custom='{"fill":"#06e7a3"}' />

Check the available values in the customization section.

custom-strstring

The stringified version of the custom property. It follows the pattern key:value;key:value;, with the possibility of setting multiple values and spaces between the punctuation characters.

Example:

html
<z-language-selector custom-str="fill:#06e7a3" />
z-themestring

Sets the theme of the component. The possible values are light and dark.

html
<z-language-selector z-theme="dark" />

From Figma to code

...

Customization

INFO

Check everything about the customization mechanics in the "How it works" documentation.

No customization tokens yet implemented for this component

Accessibility

...