Intro
An input allows users to enter and edit text or numeric values in one line.
Input – live examples
When to Use
Do
Use the input component:
- To enter a short, single-line text or number.
- To enter a password, URL, phone number, or email address.
- To select a single item from a large amount of data (for example, more than 200 items).
- To find an object by searching for more than one attribute, such as an ID, city, and customer name.
Don't
Don’t use the input component:
- To enter dates and times. Instead, use the date picker, date range selection, or date/time picker.
- To enter long texts. Use the text area component instead.
- To select multiple values. In this case, use the multi combobox (for fewer than 200 items) or the multi input component (for more than 200 items).
Anatomy
An input usually consists of a field that contains a text.
1. Field: Field container
2. Text: Placeholder or typed text
3. Icon (optional): For example, you can enable a Clear icon to remove the text that has been typed into the field.
Anatomy of an input
Dropdown Areas
The input component provides two types of dropdown area:
- An area for suggestions, which is triggered by typing.
- An area for value help, which is triggered by the respective icon button.
Types
Value Help
Input with a Label
Always provide a meaningful label for any input. Labels are necessary to indicate the meaning of the input when the placeholders are no longer visible.
To indicate that a particular field is mandatory, set the “Required” indicator for the label. This displays an asterisk (*) next to the label associated with the field.
Input as a Search
https://www.sap.com/design-system/live-examples/Input/Input_SE_VariantInputSearch.html
Input as a search field
Behavior and Interaction
Enabled, Read-Only, and Disabled States
An input can have three states:
Enabled
Read Only
Disabled
Suggestions and Autocomplete
Using suggestions and autocomplete is the quickest way for users to discover and select relevant input terms and values.
- The current typed term is always highlighted with bold text.
- Only the characters entered in the input are highlighted, not the whole word.
- All relevant instances are highlighted, even if they occur in one line item.
https://www.sap.com/design-system/live-examples/Input/Input_SE_WithSuggestions.html
Input with suggestions
Clear
https://www.sap.com/design-system/live-examples/Input/Input_LE_main.html
Input with ‘Clear’ icon – live example
Responsive Behavior
If the user clicks the input on a mobile device in cozy mode, a new full screen dialog opens.
Globalization and Localization
https://www.sap.com/design-system/live-examples/Input/Input_SE_RTL.html
Input with right-to-left text display