Search and filtering
People look for a record by what they remember about it. Put the field beside what it searches, answer while they type, and say plainly when nothing matches.
Where search sits
Search inside a module sits above the list it filters and names that list. To search all of WerkOS, open the command palette from the header, or press Cmd+K on a Mac and Ctrl+K elsewhere.
On a phone, search takes over the header until the person taps Cancel.
Results while typing
Search from the second character, a moment after the typing stops, and keep the earlier results in view, dimmed, until the new ones arrive. The results always match what is in the field. Keep the query in the address, so a shared link opens the same results and Back returns to them.
Candidates
- Sita Gurung
- Ram Thapa
- Bikash Rai
One character: nothing changes yet
Candidates
- Sita Gurung
- Ram Thapa
- Bikash Rai
Waiting: the earlier results stay, dimmed
Candidates
- Sita Gurung
- Ram Thapa
The answer: the new results take their place
Showing results
Put the closest match first. When results are of different kinds, group them under their names: candidates, companies, jobs.
Mark the words that matched. When the results settle, a screen reader hears how many there are.
Candidates
Companies
Filters
Start broad and let people narrow. Filters sit beside the search field and apply at once.
Say what is active in words, such as Status is Offer sent, and offer one control that clears them all.
Nothing found, slow and failed
When nothing matches, say what was searched and what to try next. A failed search is not an empty one. The earlier results stay on screen under a line that says the search did not finish, with Try again.
No candidates match “welder Kathmandu”.
Search did not finish.
Candidates
- Sita Gurung
- Ram Thapa
Keyboard
In the command palette the arrow keys move through the results, and the field tells a screen reader which result is highlighted, so the highlight is heard as well as seen.
- Cmd+K or Ctrl+K
- Opens the command palette
- /
- Moves focus to the module's search field
- Up and Down arrows
- Move through the results in the palette
- Enter
- Opens the highlighted result
- Escape
- Clears the query, then closes
Permitted and not permitted
Permitted
No candidates match “welder Kathmandu”.
It repeats the search, and a Clear filters button offers the next step.
Not permitted
No results
It says neither what was searched nor what to try.