Spotlight Modal
A copy-paste search & autocomplete component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Search & AutocompleteHTMLCSSany framework
ESC
↑↓ navigate · ↵ select · esc to close
Copy into your project
HTML
<div class="nuda-spot">
<div class="nuda-spot__field">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="11" cy="11" r="7" />
<path d="m21 21-4.3-4.3" />
</svg>
<input placeholder="What are you looking for?" />
<kbd>ESC</kbd>
</div>
<div class="nuda-spot__hint">↑↓ navigate · ↵ select · esc to close</div>
</div>CSS
.nuda-spot {
padding: 14px;
background: rgba(20,20,24,.85);
border: 1px solid rgba(255,255,255,.12);
border-radius: 14px;
backdrop-filter: blur(16px);
width: 100%;
max-width: 300px;
box-shadow: 0 24px 60px -16px rgba(0,0,0,.7);
animation: _spotIn .5s cubic-bezier(.16,1,.3,1) both;
}
.nuda-spot__field {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 12px;
background: rgba(0,0,0,.4);
border: 1px solid rgba(255,255,255,.08);
border-radius: 10px;
margin-bottom: 10px;
transition: border-color .25s,box-shadow .25s;
}
.nuda-spot__field:focus-within {
border-color: #e4ff54;
box-shadow: 0 0 0 3px rgba(228,255,84,.15);
}
.nuda-spot__field svg {
width: 14px;
height: 14px;
color: #e4ff54;
flex-shrink: 0;
}
.nuda-spot__field input {
flex: 1;
min-width: 0;
background: transparent;
border: 0;
outline: none;
color: #fafafa;
font-size: 13px;
}
.nuda-spot__field input::placeholder {
color: #63636e;
}
.nuda-spot__field kbd {
font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
font-size: 9px;
background: rgba(255,255,255,.06);
padding: 2px 6px;
border-radius: 4px;
color: #a0a0a8;
}
.nuda-spot__hint {
color: #63636e;
font-size: 10px;
text-align: center;
}
@keyframes _spotIn {
from {
opacity: 0;
transform: scale(.96) translateY(-8px);
}
to {
opacity: 1;
transform: none;
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-spot {
animation: none;
}
}
How to use Spotlight Modal
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.