
Search Bar
Design a search bar component for a product UI, starting with the idle field and ending with the expanded suggestion state. Show the input, search icon, placeholder text, and a clear action that appears once text is entered. The control should feel lightweight at rest but clearly active once focused.
Build the interaction around typed input. As the user types, surface a dropdown of autocomplete suggestions with a clear hierarchy: matched terms first, supporting metadata second. Include hovered, selected, and keyboard-focused rows so the component works by mouse, touch, and keyboard.
Add the states that make the pattern usable in real workflows: empty input, no results, cleared query, and focused input on mobile. Keep the field readable in a dense layout, with enough spacing for touch targets and a dropdown that does not obscure nearby content.
Match the styling to a typical SaaS interface, but keep the search affordance obvious. The finished component should look calm at rest, fast to scan when active, and easy to recover from when the query needs to be changed or cleared.
Incorporate subtle animations when a user focuses on the search bar to delight users and encourage engagement.
Better at UI design with every challenge
Select complexity and generate challenge.
