drew this one for this article :)
As a designer I find myself typing “best UI practices” into Google Search when designing any part of the project to see what can be improved when designing UI elements.
This is my first article and I decided to share some things I learned about one of the most used UI elements — Text Fields
I tried to make these examples and explanations as concise and clear as possible.
Clickability
- Separate background from a text field for strong clickability and space cues
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fac6835ac-3540-4397-9f52-494c02501972%2FUntitled.png?id=5f630f3c-9d72-4c06-b63c-67c90980fb6d&table=block)
Corners
- Experts say that rectangles with rounded corners are easier on the eyes than a rectangle with sharp edges.
- Rounded corners on text fields could cause users to view your form as more user-friendly.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F344a8961-ec9f-40d3-aa6e-9e638c8e5578%2FUntitled.png?id=8ae783a4-5941-4b25-8c31-e1c9d4a3f83b&table=block)
Labels
- Avoid using CAPS for labels. All-capitalized letters are hard to scan and read.
- Put each label close to the input field to make them visually grouped.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fcc474ec9-3e05-4766-9a69-dfed0bed1af1%2FUntitled.png?id=a98848c2-d137-4247-96b2-d9de2c189c5a&table=block)
Labels & Placeholders
- Never use placeholder text instead of a label. Use static or floating labels.
- Placeholder would disappear once the user interacts with the input field. It can lead users to forget the purpose of the field.
- Without labels, users cannot check their work before submitting a form.
- Floating labels can save space on mobile devices.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F44da3aae-7916-489a-89ad-cc98269d0b95%2FUntitled.png?id=5acfb96b-96bc-4f33-ac71-437cb7efbcba&table=block)
Select state
- Auto-focus the first input field.
- Highlight the active field to make it easy to focus on it.
- Changing the border color and increasing the border thickness from 1 pixel to 2 is enough.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ffb8caf06-7b5d-4109-a1aa-97665498c6a7%2FUntitled.png?id=3a37a796-83ae-4ce7-a7ec-fe6713e3ff8f&table=block)
Single Column Layout
- Put field labels above the fields to improve the way users scan the form.
- More space available for labels.
- Dramatically increases the completion time
- The eyes move naturally from the top to the bottom.
- Removes confusion in the user’s mind regarding the order and dependency of the fields to each other.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fb79da6e0-cd9c-4686-a1b0-07717c51f5a0%2FUntitled.png?id=4282af6f-9ef3-4c06-be60-26bb62602760&table=block)
Combine Data Fields
- If you don’t have specific reasons do not separate fields that can be combined.
- Follow the real-world format.
- Support international formats.
- Use separate fields for city, state, and zip code since they need to be processed separately.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F797ae011-b3cd-4f51-9016-f11aceba35ba%2FUntitled.png?id=a75620df-f4b6-4bce-862e-30ebd202f772&table=block)
Optional vs Required
- Try to minimize the total number of fields.
- Make sure that the fields that are not Required are marked as being optional.
- Avoid using an asterisk (*) since users might not understand it’s meaning.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F1315c296-9d21-4893-b1d6-b49f72d82252%2FUntitled.png?id=c347e454-69ff-45c2-acf3-4017f1614d69&table=block)
Group related fields
- Group related fields into logical sections.
- Use white space between sections to distinguish them visually.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fca961c5d-391b-4379-8b71-71821ae31400%2FUntitled.png?id=9d6cd1a4-9ea8-4e68-be45-5c8967ef0616&table=block)
Visual & Input Constraints
- Use different field length sizes based on the required information.
- The size of a field provides a visual constraint to the user.
- To decrease the number of mistakes and wrong data use the constraints on what can be inputted into the field:
— min and max length (num. of characters)
— format;
— numeric, alphabetic, alphanumeric, all symbols;
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fbd6d2647-7dcd-4e62-a1ff-be86a55eee13%2FUntitled.png?id=7716c351-89b3-4448-9869-59c4366cb17d&table=block)
Password
- Do not use a “Retype password” field.
- Instead, provide an option that allows users to check the password.
- Show if the Caps Lock is on to reduce errors.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fb9e2d6b4-c922-404e-beac-cca64e6ace3c%2FUntitled.png?id=5879f958-37de-4969-aca2-a275cb2b7e9e&table=block)
Pre-fill and Auto-detect
- Pre-fill any information about a user from data previously provided by them or computed data based on their IP address, zip code, etc.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ffe96ab6c-087d-429a-a927-8825dc0a39d8%2FUntitled.png?id=ba4dc4f4-eb29-4fa0-bf94-f4560f8fe160&table=block)
Autocomplete
- Autocomplete when possible to save users from typing.
- Provide users with a list of suggestions related to what the user has typed.
- Use autocorrection to modify words that appear to be misspelled.
- Don’t use Select Menus for Known User Input.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fcee183b8-fd4a-4bae-8439-0bd4a843e17b%2FUntitled.png?id=8d8bfd64-785b-42fd-8dee-941ca7eedd00&table=block)
Placeholders & Masked Input
- Use placeholder text to give a hint about what content is expected for fields that require data in a specific format.
- It’s better to use masks instead of placeholders for Phone Numbers, Card numbers, expiry dates, etc.
- You must always consider local differentiation. The field labels, placeholders, masks, etc. can be different for different countries or regions.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F85a0c521-4c18-4a44-8893-d8fa8fc892ff%2FUntitled.png?id=f05cee3a-8f1a-4ec7-a8bd-b64c71e1dc2f&table=block)
Explain why
- To prevent unnecessary doubts and questions you must explain why you ask some specific data like the phone number, birthday, weight, spouse name, etc.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F73b83a87-eebd-482a-a16a-2883e3805178%2FUntitled.png?id=5fa41204-3154-42f2-ba47-6fe96ac9fb40&table=block)
Error messages & Validation
- Don’t hide your error messages
- Show which field caused the error preferably using a red color signal to attract attention.
- The usage of icons and supportive will help colorblind people fix the problems.
- Place error messages to the right of the field for the web and the bottom for mobile.
- Provide information about what can a user do to fix the situation.
- Be clear, precise and polite in your messages.
- Don’t place a large summary of errors at the top or bottom of the page.
- Provide information just in time (Telling users at the right time)
- Decide should the user get live feedback? When leaving the focus of the input? When submitting the form?
- Use inline validation with real-time feedback immediately for strict requirements like username, password.
- Inform in plain and simple language that a non-technical user understands.
![image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F5eb0075e-e6f7-4faa-adae-ba7f00a823ec%2FUntitled.png?id=9b13480a-0afa-4e2a-a694-ea704960a224&table=block)
Grateful for these articles that helped me in my research:
https://uxplanet.org/the-18-must-do-principles-in-the-form-design-fe89d0127c92
https://www.smashingmagazine.com/2018/08/best-practices-for-mobile-form-design/
https://uxdesign.cc/11-form-design-guidelines-4b2f1c659414
https://uxdesign.cc/the-ux-behind-designing-better-forms-d6ebe7a817d2
Your feedback is really appreciated. Thanks and keep designing :)