Type-ahead Reveal
A copy-paste search & autocomplete component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Search & AutocompleteHTMLCSSany framework
Animations library
Copy into your project
HTML
<div class="nuda-typeahead">
<span class="nuda-typeahead__typed">Animation</span>
<span class="nuda-typeahead__ghost">s library</span>
</div>CSS
.nuda-typeahead {
display: inline-flex;
align-items: center;
padding: 10px 14px;
background: rgba(0,0,0,.3);
border: 1px solid rgba(255,255,255,.08);
border-radius: 10px;
font-size: 13px;
font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
width: 100%;
max-width: 260px;
}
.nuda-typeahead__typed {
color: #fafafa;
}
.nuda-typeahead__typed::after {
content: '';
display: inline-block;
width: 2px;
height: 14px;
background: #e4ff54;
margin: 0 1px;
vertical-align: middle;
animation: _taCaret 1s steps(2) infinite;
}
.nuda-typeahead__ghost {
color: #63636e;
opacity: 0;
animation: _taGhost 1.5s ease-out .8s forwards;
}
@keyframes _taCaret {
50% {
opacity: 0;
}
}
@keyframes _taGhost {
from {
opacity: 0;
transform: translateX(-4px);
}
to {
opacity: 1;
transform: none;
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-typeahead__typed::after,.nuda-typeahead__ghost {
animation: none;
}
.nuda-typeahead__ghost {
opacity: .6;
}
}
How to use Type-ahead Reveal
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.