Florian Schulz

Design engineering 101: Typeahead like Spotlight and Omnibox

I was curious how I could implement a typeahead feature in a web browser. The one I know from a browser’s address bar or Apple’s Spotlight search on macOS or iOS.

type

What is typeahead?

A text input field with typeahead suggests completions as you type, right inside the field. I’ve seen two variants of the feature:

  1. Dimmed text: Completed text is appended as dimmed text after the user input. Commonly used in terminals, code editors or text editors.
  2. Highlighted text: Completed text is appended as highlighted text with additional styled text. For example, Apple Spotlight may append an action like “Open” or “Sea…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help