Decide when to use clear button within text input
Problem
Our new form specs include inputs with an without a clear button, but we don't have guidelines on when to use them
With | Without |
---|---|
Solution
-
Only add the clear button to fields that are frequently filled in with different data by the same user
- For example, search and filter inputs (it looks like this is the pattern we are currently following on gitlab.com)
- https://ux.stackexchange.com/questions/75768/is-a-clear-input-button-only-for-search-fields/75769#75769
-
Try to avoid them as much as possible
- For many types of inputs, a clear button can be more harmful than helpful (a user can accidentally click it and all their work is irreversibly gone)
- https://www.nngroup.com/articles/reset-and-cancel-buttons/
Example(s)
With | Without |
---|---|
Usage
(When do you use this pattern? And how?)
Dos and dont's
(Use this table to add images and text describing what’s ok and not ok.)
|
|
---|---|
Related patterns
(List any related or similar solutions. If none, write: No related patterns)
Links / references
Pattern checklist
Make sure these are completed before closing the issue, with a link to the relevant commit, if applicable.
-
Read our contribution guidelines, especially the For GitLabbers section. -
Create a Sketch file in your progress folder just for this pattern and make sure that: -
You have not created a duplicate of an existing pattern, symbol, layer style, or text style. -
You have used the proper method for creating the pattern depending on the complexity. Atoms and molecules are symbols, organisms are groups. -
Typography uses text styles. When applicable, colors use shared styles.
-
-
Ask a UXer to review your Sketch file, linking them to your latest commit so they know where to find it. If they have the capacity, they should assign themselves to this issue. -
QA of your Sketch file by the reviewer. -
Add your changes to the pattern library. When copying things over, watch out for duplicated symbols, layer styles, and text styles. Some of our recommended plugins can help you find and remove duplicates. -
QA of pattern library by the reviewer. -
Create an issue in the Design System to add the pattern documentation. Mark it as related to this issue. -
Add an agenda item to the next UX weekly call to inform everyone (if it's a new pattern, not yet used in the application).
Edited by Annabel Dunstone Gray