Inputs
v1.0.0Added in 1.0.0
The search field for lists and pages: debounced search, a focus shortcut, a spinner, a results count, recent searches and suggestions.
Press / anywhere on the page (not while typing in another field) and the search field takes focus with its text selected; the / hint at the end of the empty box shows which key it is and hides while the field is focused. Type and the search runs once you pause (300 ms by default): the magnifier crossfades into a spinner while the page loads, and a muted count like 318 results appears at the end and is read out politely. Enter searches at once, saves the query to the recent searches and closes the dropdown. On focus a dropdown opens under the field with Recent searches (each with an × to forget it and a Clear button for all of them) and suggestions, both filtered by what you type with the matches in bold. Arrow Down moves into it while the caret stays in the field, Enter picks the highlighted row, Delete or Shift+Backspace removes a highlighted recent search, and Escape first closes the dropdown, then clears the text, then leaves the field. The × in the box clears and searches at once. With expandable the field starts as a square icon button, grows with a spring on click, tap or the shortcut and folds back when you leave it empty. On a phone the keyboard shows a Search key, the text is 16px so iOS never zooms, the dropdown stays under the field above the keyboard with 44px rows, no key hint is shown, and picking a search or pressing Search lowers the keyboard so the results show.
npx wingo-ui@latest add search-inputPro item: the CLI needs a Pro account. See plans
30 listings around New York

Schwinn city bike
Brooklyn · Sport

Trek Marlin mountain bike
Queens · Sport

Xiaomi electric bike
Brooklyn · Sport

Kids bike, 20 inch
Hoboken · Sport

iPhone 13, 128 GB, like new
Brooklyn · Electronics
Searches after a 300 ms pause · no saved searches
Press Slash anywhere, then Down arrow through recent searches, Enter searches, Escape closesTap the field for recent searches and categories