Intro to UI Inputs
Understand the different types of form inputs and when to use them
Understanding the types of form inputs and when to use them is vital to designing effective forms that users engage with. Poorly designed inputs can cause users to abandon the action they were taking, resulting in low conversion rates.
Filling out forms, whether it’s a search form, a contact form, a signup form, or an order form, is the backbone of many websites. Without forms, users would have limited ways to interact with or contact a brand, and e-commerce wouldn’t exist at all.
Creating highly usable, intuitive forms with properly formatted inputs makes the form experience more enjoyable. While it may be a stretch to expect users to fall in love with form-filling, creating such user-friendly forms ensures they, at the very least, won't find it bothersome.
The most basic type of input is the single-line input. As the name suggests, single-line
If users need to enter longer-form answers, then multi-line
They're an excellent option for compact layouts that still require users to enter large amounts of text, for example, when collecting feedback on a survey.
Like multi-line
The advantage of text areas over multi-line inputs is that text areas encourage longer responses with a larger initial size.
Pro Tip: If there is a limit to how much users can write, use helper text to indicate the character limit.
Text
It’s a good idea to give users the option to reveal the password they’ve entered (turning it back into real characters) if they need to check whether they’ve typed the correct password.
Pro Tip: To prevent users from not complying with password requirements, include a helper text next to the label.
Another special type of text input is the
Search inputs are usually indicated with a magnifying glass icon, often accompanied by a placeholder or floating label. Placing the magnifying glass icon before the placeholder helps speed up recognition and more efficiently guides users.
Regardless of the type of text
On complex and rarely used forms, disappearing placeholders are likely to strain users' short-term memory. If they get distracted, switch a tab, and then return to a form, they may not remember the hint. They'd need to remove what they've typed and click away from the input to see the placeholder text again.
To prevent such frustration, always use placeholders in combination with
Pro Tip: Make placeholder text more subtly colored than user-entered content so that users don’t mistake them for data they’ve already entered.
Calendar
Any time your users need to enter a date, schedule an appointment, book a flight, buy a movie ticket, etc., using a calendar input specifically makes it easier to complete. Calendar inputs should use masks and
Select
This input type is beneficial for scenarios where there are limited, predefined choices, as it ensures data consistency and reduces input errors. Select inputs are space-efficient, as they only display one option until expanded, making them suitable for situations like choosing a country, state, or category.
Action
You'll come across action inputs in various contexts. For instance, during online checkout, when users input a coupon code and click "Apply," or alongside the "
Required
- Should the asterisk follow or precede the input's label? Putting it before the
label may help users of left-to-right languages more quickly identify required inputs while scanning the form. - Should the asterisk be red? Not necessarily, but red is often associated with something that grabs attention. You can use your
brand color if it's contrasting enough. The only recommendation is to try to avoid pale gray that users may not even notice.[2]
Pro Tip: To slightly reduce cognitive load, you may also mark optional fields with the word "optional."
A study by Baymard reveals that 89% of users tend to enter numerical
To prevent validation
References
- Material Design | Material Design
- Marking Required Fields in Forms | Nielsen Norman Group