StealThis .dev
Pages Medium

Shop — Search Results

A fast-feeling storefront search results page with a live autocomplete dropdown that blends recent searches, popular queries, and matching products as you type. Keyboard-navigable suggestions, a result count, filterable facet chips, sort control, and product cards with ratings, prices, sale and stock chips. Includes a did-you-mean spelling correction and a friendly no-results state with popular search shortcuts. Built with semantic HTML, an accessible combobox, and zero dependencies.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Search Results

A complete storefront search experience built around an accessible combobox. As you type, a live dropdown groups recent searches, popular queries, and matching products (with thumbnail, category, rating, and price), highlighting the matched substring inline. The list is fully keyboard navigable with arrow keys, Enter to select, and Escape to dismiss, and it wires up aria-activedescendant for screen readers.

Submitting or picking a suggestion filters the results grid instantly. Facet chips switch category or toggle On sale / In stock, a sort control orders by relevance, price, or rating, and the live result count updates as you go. Each product card shows star ratings, review counts, original-vs-sale pricing, and a stock chip, with working Add-to-cart and wishlist buttons plus a toast confirmation.

When a query returns nothing, a did-you-mean correction (powered by an inline edit-distance check) offers the closest term, and a polished empty state suggests popular searches as one-tap shortcuts. Everything is plain HTML, CSS, and vanilla JS — no frameworks, no external images, and responsive down to about 360px.

Illustrative storefront UI only — fictional products, prices, and reviews. No real checkout.