when you start to type something familiar in the search bar, it will finish it in ghost text. since the text is non highlight-able i’m guessing it’s a generated and positioned background image. Does anyone know how they actually do it? i want to build something like it.
Share
here’s how google did it:
behind the transparent input box is a div containing the typed letters as well as a container with the “ghost” word. all of them are meticulously aligned so that the typed letters perfectly hide the letters of the “ghost word”.