Empty Search
A copy-paste empty states component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Empty StatesHTMLCSSany framework
?
No results found
Copy into your project
HTML
<!-- Empty Search -->
<div class="nuda-empty-search" role="status" aria-label="No results found">
<div class="nuda-empty-search__scene">
<svg class="nuda-empty-search__lens" viewBox="0 0 48 48"
fill="none" stroke="currentColor" stroke-width="2.5"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="20" cy="20" r="14" />
<path d="M30 30 L42 42" />
</svg>
<span class="nuda-empty-search__q">?</span>
</div>
<p class="nuda-empty-search__text">No results found</p>
</div>CSS
/* Empty Search
Magnifying glass sweeping with a pulsing question mark.
Customize: --empty-search-color, --empty-search-text, --empty-search-size */
.nuda-empty-search {
--empty-search-color: #e4ff54;
--empty-search-text: rgba(255, 255, 255, 0.55);
--empty-search-size: 64px;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
padding: 12px;
color: var(--empty-search-color);
}
.nuda-empty-search__scene {
position: relative;
width: var(--empty-search-size);
height: var(--empty-search-size);
animation: nuda-empty-search-sweep 3.6s ease-in-out infinite;
}
.nuda-empty-search__lens {
width: 100%;
height: 100%;
color: currentColor;
filter: drop-shadow(0 0 8px rgba(228, 255, 84, 0.18));
}
.nuda-empty-search__q {
position: absolute;
left: 0;
top: 0;
width: 60%;
height: 60%;
display: flex;
align-items: center;
justify-content: center;
font: 700 calc(var(--empty-search-size) * 0.32) ui-sans-serif, system-ui, sans-serif;
color: currentColor;
animation: nuda-empty-search-q 1.6s ease-in-out infinite;
}
.nuda-empty-search__text {
font: 500 12px ui-sans-serif, system-ui, sans-serif;
color: var(--empty-search-text);
letter-spacing: 0.02em;
margin: 0;
}
@keyframes nuda-empty-search-sweep {
0%, 100% { transform: rotate(-8deg); }
50% { transform: rotate(8deg); }
}
@keyframes nuda-empty-search-q {
0%, 100% { opacity: 0.4; transform: scale(0.92); }
50% { opacity: 1; transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
.nuda-empty-search__scene,
.nuda-empty-search__q {
animation: none;
}
}How to use Empty Search
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.