sunweb

Textbox

component textbox form-element

Definition


Text inputs enable the user to interact with and input data.
We use them when the application requires long-form content from the user.

c-textbox

Handlebars

Loading...

The icon could be positioned at right as well, unless the textbox is of type "password", in that case the icon will remain in the left, in order to have space for the icon to see/hide the password

Handlebars

The icon and the clear button are optional. Thus, you could use the component without them.

Handlebars

Textbox with value.

Handlebars

Textbox of type password

Handlebars

Loading...

Javascript

Loading...

Textbox with info tooltip

Handlebars

Loading...

Javascript

Loading...

States


c-textbox > .is-disabled

The disabled state blocks the users interaction and modifies the appearance to let them know that edition is not possible.

Handlebars

.is-disabled > c-textbox

In some cases, the textbox is not disabled at component level but instead one ancestor is marked as disabled. This is mainly done when loading data to let the users know that the component is not useful at that moment.

Handlebars


c-textbox > .has-success

The success state let the user know that the filled information is correct.

Handlebars


c-textbox > .has-warning

The warning state let the user know that the filled information has an issue.

Handlebars


c-textbox > .has-error

The error state let the user know that the filled information has an error.

Handlebars

Surname is Required
Field cannot be empty
Loading...

Modifiers


c-textbox > .c-textbox--highlighted

The highlighted modifier changes the color when an option is selected.
It is used in contexts when is useful to let the users know that an options is choosen (i.e. search filters or booking steps).

Handlebars