32 CSS Search Box & Search Bar Designs 29 / 32
Inset Pressed
Skeuomorphic inset shadow makes the input look pressed into the surface — a return to depth without the kitsch.
The code
<form class="csb-inset" role="search">
<label class="csb-sr" for="csb-inset-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-inset-i" type="search" name="q" placeholder="Search..." />
</form> <form class="csb-inset" role="search">
<label class="csb-sr" for="csb-inset-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-inset-i" type="search" name="q" placeholder="Search..." />
</form>.csb-inset {
display: inline-flex; align-items: center; gap: 10px;
padding: 11px 16px;
background: #15151d;
border: 1px solid #0c0c12;
border-radius: 10px;
box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.04);
transition: box-shadow 0.2s;
}
.csb-inset:focus-within {
box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 0 0 2px rgba(124,108,255,0.3);
}
.csb-inset svg { width: 15px; height: 15px; fill: none; stroke: #6b6987; stroke-width: 2; stroke-linecap: round; }
.csb-inset input {
width: 220px; padding: 0;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
}
.csb-inset input::placeholder { color: #b8b6d4; }
.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;
}
.csb-inset {
display: inline-flex; align-items: center; gap: 10px;
padding: 11px 16px;
background: #15151d;
border: 1px solid #0c0c12;
border-radius: 10px;
box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.04);
transition: box-shadow 0.2s;
}
.csb-inset:focus-within {
box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 0 0 2px rgba(124,108,255,0.3);
}
.csb-inset svg { width: 15px; height: 15px; fill: none; stroke: #6b6987; stroke-width: 2; stroke-linecap: round; }
.csb-inset input {
width: 220px; padding: 0;
border: 0; outline: none; background: transparent;
color: #f0eeff; font: 500 14px/1 system-ui, sans-serif;
}
.csb-inset input::placeholder { color: #b8b6d4; }
.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
Brutalist StampCompact ToolbarHero SearchSide IndicatorDrop Shadow FloatSearch + FilterDual Tone OutlineGlitch SearchCompact MobileFocus Ring BloomBorder TraceFloating Card
View the full collection →