Search bar
Rounded search bar with an icon and a keyboard hint. The border lights up on focus.
BackgroundGridAccent
Corners
SharpRound
Shadow
NoneStrong
Motion
NoneBounce
<style>
.ux-search{display:flex;align-items:center;gap:10px;width:100%;max-width:260px;height:44px;padding:0 10px 0 14px;border-radius:var(--rp,999px);background:var(--bg,#fff);border:1.5px solid var(--line,#cfd2da);color:var(--muted,#6b6f7b);font:15px system-ui;transition:border-color var(--dur,.15s) var(--ease,ease),box-shadow var(--dur,.15s) var(--ease,ease)}
.ux-search:focus-within{border-color:var(--accent,#cc4a26);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent,#cc4a26) 18%,transparent)}
.ux-search input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:var(--fg,#14151a);font:inherit}
.ux-search kbd{font:12px ui-monospace,monospace;padding:3px 7px;border-radius:calc(6px * var(--r,1));background:var(--soft,#eceef3)}
</style>
<label class="ux-search">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
<input type="search" placeholder="Search everything" aria-label="Search">
<kbd>⌘K</kbd>
</label>When to use it
Use this inside a form where people type or paste information. It should feel at home next to your other fields, with the same spacing and focus style.
Accessibility
Check that it reaches every state with the keyboard alone before you ship it, and keep the focus ring instead of removing it for looks. It has no JavaScript dependency, so it keeps working if a script fails to load, and it is built on native form controls or semantics rather than divs pretending to be one. Colors are read from CSS custom properties, so they follow your light or dark theme and you can raise contrast globally without touching this component.