StealThis .dev

Wiki — Command-K Instant Search Overlay

A Command-K instant-search palette for the fictional Aurora DB knowledge base. Pressing the keyboard shortcut or the search trigger opens a centered modal with a search field, live fuzzy-filtered results grouped into Pages, API, Recent and Actions, each with an icon, subtitle and type badge. The active row tracks the keyboard, arrows wrap top to bottom, enter opens with a toast, recent searches persist for the session, and a focus trap plus footer keyboard hints round it out. Inter, Source Serif 4 and vanilla JS only, fully responsive.

Apri in Lab
html css vanilla-js
Target: JS HTML

Codice

Command-K Instant Search Overlay

A clean knowledge-base reading view for Aurora DB, a fictional distributed database, fronted by a fast Command-K search palette. The page itself is a real docs layout — sticky top bar with a Search docs… ⌘K trigger, a persistent left sidebar, and a centered serif article on the storage engine. Pressing ⌘K (or Ctrl+K), clicking the trigger, or hitting / opens a centered modal over a dimmed backdrop.

Inside, a single input live-filters a small index with a lightweight fuzzy matcher that scores contiguous runs, word-start hits and exact substrings, then highlights the matched characters in each title. Results stay grouped into Recent, Pages, API and Actions, each row carrying an icon, a subtitle and a type badge. The active row follows the keyboard: and move and wrap around the ends, Home/End jump, opens the row with a toast, and Esc or a backdrop click dismisses the palette.

A focus trap keeps tabbing inside the dialog, focus is restored to whatever opened it, recent searches persist for the session via sessionStorage, and the footer spells out every shortcut. Everything is vanilla JS — no frameworks, no build step — and the layout collapses the sidebar into a drawer and shrinks the palette on narrow screens, respecting reduced-motion preferences throughout.

Illustrative UI only — fictional articles, products, and data.