Text Input

The Text input component is an input field that allows users to enter information inside. You can:

Example

You can use the Text input component to create an app to modify your customer information. In this example:

Note: The Text input component follows the WCAG 2.0 AA accessibility guidelines. See the Properties section for accessibility configuration tips.

Text input component

Configuration example

This example shows how to configure the Customers app (see Example of usage). Follow these steps to configure it:

Note: Only the properties relevant to the example are explained. See the Properties section for more details.

Properties

The following Text input component properties are available:

Main

Property Description
Component ID Enter a unique name for the component. See templating in components for more details.
Label Enter the name you want to be displayed above the component. To make the component accessible to assistive technology, make sure to be as descriptive as possible. For example, if the expected input is an email, enter a descriptive label such as 'Enter your email'.
Placeholder Enter a text that provides a hint for the expected input. By default, 'Placeholder' text is displayed. To make the component accessible to assistive technology, make sure to be as descriptive as possible. For example, if the expected input is an email, enter a descriptive placeholder such as 'example@email.com'.
Description Add a description for the component. The text is displayed under the component. Error messages have priority and will hide the description temporarily.
Default value Enter a value to appear by default.

Note: See Templating drop-down for more details on rendering dynamic content using Liquid.

Styles

Property Description
Input format Select the format from the drop-down.
Input height Select the height.
Input width Select the width.
Max length Enter the maximum number of characters allowed.
Inline label Select the checkbox to position the Label inline.
Show count Select the checkbox to display a word counter under the text input.
Clearable Select the checkbox to allow users to clear the field.
Show full description Select the checkbox to show the full text of the Description from Main properties.

Validation

Property Description
Required field Turn on to make the component mandatory. By default, the component is optional.
Add rule Add rules in Liquid to specify when the component is required. If no rules are set, the component will be required in all instances.
Message Enter a message to be displayed if the user does not fill in the input. A default message is otherwise shown.
Choose common pattern Select the expected input data from the drop-down. See available common patterns for more details.
Additional validations Select any or all checkboxes to add validations.
Error Select the checkbox to add a red error style validation to the component.
Add rule Add rules in Liquid to specify when the error validation is shown. This field is mandatory if you select the checkbox.
Error message Enter a message to be displayed if the user fills in the input incorrectly. This field is mandatory if you select the checkbox.
Warning Select the checkbox to add an orange warning style validation to the component.
Add rule Add rules in Liquid to specify when the warning validation is shown. This field is mandatory if you select the checkbox.
Warning message Enter a message to give the user advice on how to better fill in the input. This field is mandatory if you select the checkbox.
Informative Select the checkbox to add a blue informative style validation to the component.
Add rule Add rules in Liquid to specify when the informative validation is shown. This field is mandatory if you select the checkbox.
Informative message Enter a message to give the user any additional information. This field is mandatory if you select the checkbox.

Note: See add rules to trigger properties for more details.

Interactions

Property Description
Hidden Select the checkbox to hide the component in the end-user app. You can set rules to hide the component using Liquid. The rules are available only when hiding the component with the checkbox not when hiding the component from the canvas with the Eye icon in the Layers panel.
Disabled Select the checkbox to disable the component in the end-user app. You can set rules to disable the component using Liquid.
Read only Select the checkbox to set the component to read only. You can set rules to prevent editing using Liquid.

Note: See add rules to trigger properties for more details on setting rules to these properties.

HTML

Property Description
Aria label Enter a text designed to help assistive technology attach a label to the component.
Name Enter a text to specify a name for the HTML element.
Title Enter a text to be displayed as a tooltip when hovering the mouse over the component in the end-user app.
Tab index Enter the navigation order for keyboard navigation.

Events

The Text input component supports the On update event. See events and actions for more details. Text input logic map