32 CSS Search Box & Search Bar Designs
Glass Search
Frosted-glass shell with backdrop blur — sits beautifully over hero images and gradient backgrounds.
Glass Search the 3rd of 32 designs in the 32 CSS Search Box & Search Bar Designs collection. The design is implemented in pure CSS — no JavaScript required. Copy the HTML and CSS panels below into your project. Because the demo is pure CSS, it works in any framework or templating engine you happen to use. The design honours prefers-reduced-motion and uses real semantic markup, so it ships accessibility-ready out of the box.
Live preview
The code
<form class="csb-glass" role="search">
<label class="csb-sr" for="csb-glass-i">Search</label>
<svg viewBox="0 0 24 24" aria-hidden="true">
<circle cx="11" cy="11" r="7" />
<path d="m20 20-3.5-3.5" />
</svg>
<input id="csb-glass-i" type="search" name="q" placeholder="Search..." />
</form> .csb-glass {
display: inline-flex; align-items: center; gap: 10px;
padding: 10px 18px;
background: rgba(255,255,255,0.06);
border: 1px solid rgba(255,255,255,0.18);
border-radius: 14px;
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
transition: background 0.25s, border-color 0.25s;
}
.csb-glass:focus-within { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.32); }
.csb-glass svg { width: 16px; height: 16px; fill: none; stroke: rgba(255,255,255,0.7); stroke-width: 2; stroke-linecap: round; }
.csb-glass input {
width: 220px; padding: 0;
border: 0; outline: none; background: transparent;
color: #fff; font: 500 14px/1 system-ui, sans-serif;
}
.csb-glass input::placeholder { color: rgba(255,255,255,0.55); }
.csb-sr {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
More from 32 CSS Search Box & Search Bar Designs
Search + FilterDual Tone OutlineGlitch SearchCompact MobileFocus Ring BloomInset PressedBorder TraceFloating CardAurora DriftVoice SearchLoading SpinnerExpanding Input
View the full collection →