Search Bar
UI DesignWhat is a Search Bar
A search bar is a text field where users type a query to find content in a site or app. It usually shows a magnifying glass icon, placeholder text and a button or key to submit, and often suggests results as users type.
Anatomy of a Search Bar
- Input field: Where users type the query
- Search icon: The magnifying glass, one of the few universal icons
- Placeholder: A hint such as "Search jobs"
- Clear button: Removes the query in one tap
- Suggestions: Optional results or queries while typing
Where to place a Search Bar
Put it at the top of the page, usually on the right. On search-led products, it can be the center of the page. Show a visible box, not just an icon, so users find it quickly.
Search Bar best practices
Make the field wide enough for a typical query. Keep it simple and avoid making users choose a scope before they search. Show helpful suggestions and handle no-results with a useful empty state.
Frequently asked questions
Where should a search bar go?
At the top of the page, usually in the right corner, where users look for it. NN/g notes the left side works almost as well. On search-heavy sites, it can sit in the center of the page.
Should search be a visible box or just an icon?
A visible box is better on most sites. Users scan for "the little box where I can type", and a box is found faster than an icon that must be clicked first.
How wide should a search bar be?
Wide enough to show a typical query without scrolling. If the box is too small, the text scrolls out of view and users cannot check what they typed.
Related terms
View all UI Design terms →Search UX
Search UX is the design of how people find content through site search . It covers the search box, the suggestions shown while users type…
Combobox
A combobox is an input field combined with a popup list of options . Users can type to filter or enter a value, then pick from the…
Input Field
An input field, or text field, is a box where users type information , such as a name, email address or password. It is the most common…
Navigation Bar
A navigation bar is the part of an interface that holds the main navigation links or destinations . The term means slightly different…
Information Architecture
Information Architecture (IA) is the structural design of information spaces and content organization systems. It involves organizing…
Empty State
An empty state is the screen or area users see when there is no content to show , such as a new dashboard, an empty inbox or a search with…
