Search

The input that answers as you type.

v1.0.0·Updated Jul 8, 2026 · 10:45
Live Demo — Fully Interactive
Results answer live — try “ta” or “co”
Configuration
Size
Clear button
Shortcut
Query
<Search size="m" clearable placeholder="Search…" />
Behavior — The Engineering Contract
Prop / eventTypeNotes
onSearch(q) => voidDebounced query callback
resultsResult[]Rows to render in the listbox
clearablebooleanShows the × once there is a query
shortcutstringKey hint that focuses the field
sizeL · M · SMatches Input; M is the default
↑ / ↓ · Enter · EscMove results, open one, or clear + close

Search runs a free-text query and returns ranked results. To pick from a known list use a Combobox; for a global jump-anywhere palette use the Command Menu.

Anatomy
combobox
1MagnifierLeading icon that names the field's job.
2QueryFree text; a × or shortcut sits at the end.
3ResultsRanked rows with icon, title and meta.
Do's and Don'ts
✓ Do
ComboboxForms

Give each result a title and context, so people pick the right one.

✕ Don't
comboboxcommand menu

Don't return bare strings with no context or ranking.

✓ Do
No components match “xyz”.

Make the empty state specific and calm — echo the query back.

✕ Don't
Type here

Don't drop the magnifier. Without it, a search reads as any input.

In context: Examples
A · Docs search
Search the docs…/

A header search with a "/" shortcut to focus from anywhere.

B · Table filter
invoice

A small search filtering rows in place, size S.

C · Result list
Color SystemFoundationsCalloutFeedback

Live results with icon, title and the section they live in.

Measurements & Tokens
TokenValueRole
--search-icon38px left padRoom for the leading magnifier
--search-affix44px right padRoom for clear × or shortcut
--result-hover#1E1F25Active / hover result row
--result-meta#767B87Secondary meta line
--kbd-border#2A2A30Shortcut key outline
--field-focusrgba(255,122,0,.14)Warm focus ring
Code
<div class="o-search">
  <span class="o-input__icon"><SearchIcon /></span>
  <input class="o-input o-input--m has-icon" type="search"
         role="searchbox" placeholder="Search components…" />
  <button class="o-input__affix" aria-label="Clear">×</button>

  <div class="o-menu" role="listbox">
    <button class="o-search__result" role="option">
      <DocIcon /> <span><b>Combobox</b><small>Forms</small></span>
    </button>
  </div>
</div>