<div class="search-wrapper">
<input type="text" class="search-input" placeholder="Search website..." aria-label="Search">
<button class="search-btn" aria-label="Submit Search">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<circle cx="11" cy="11" r="8"></circle>
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg>
</button>
</div>
Back to Snippets
Sleek Expandable Search Bar CSS
Save space with this smooth, expanding search bar. The input reveals itself on hover or focus, and we use a high-quality SVG icon that stays perfectly centered at all times.
484