Search allows users to quickly locate content across an app. Basic search enables users to input a query into a search text field to view related results.
Search query input methods can be extended to include historical suggestions, auto-completion of queries, and voice input.
Use persistent search when search is the primary focus of your app. The search text field is presented inside of a search bar, ready to receive focus.
- When in focus, the search experience expands to fill the entire screen. Optionally, historical search suggestions can displayed below the text field.
- A user can type a query or select from a suggestion (if available). Upon pressing Return, the search is submitted.
- Search results are displayed below the search bar.
- To release focus from the search box and dismiss search suggestions, the user taps the Up arrow.
Use expandable search when search is not the primary focus of your app. Expandable search displays a search icon in the toolbar, instead of an open search text box.
- The user taps the search icon (in the toolbar) to transform it into a focused search bar.
- As a user types, historical search suggestions can be shown beneath the search bar.
- Upon entering a query or choosing a suggestion, pressing Return submits the search.
- Results appear below the search bar and scroll beneath it.
When displaying results, the search text field remains visible, but not in focus. Tapping the Up arrow releases the focus from search, dismisses suggestions and the on-screen keyboard, and returns the toolbar to its original state.