Input

Input provides an editable field for users to enter text using alphanumeric characters. It is ideal for short, freeform content and data entry.

Also known as: Text Field, Text Box
Salt package@salt-ds/core
Available since1.8.0
Note: This tab list includes overflow; tab positions may be inaccurate or change when a tab is selected

To avoid misleading users, set the width to correlate to the length of the answer you’re expecting. For example, an input for a three-digit value shouldn't be wide enough to accommodate a sentence worth of characters. See forms pattern for more information on layout.

To ask a user a subjective question to which user responses will vary and the length of their answer is likely to be less than a single line.

When the content is likely to exceed a single line. Instead, use MultilineInput. Input field width and height should always reflect the amount of content expected in the field.

To import Input from the core Salt package, use: