Skip to content

Empty Box

A copy-paste empty states component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

Empty StatesHTMLCSSany framework

No data found

Copy into your project

HTML
<!-- Empty Box -->
<div class="nuda-empty-box" role="status" aria-label="No data found">
  <div class="nuda-empty-box__scene">
    <span class="nuda-empty-box__dust nuda-empty-box__dust--a"></span>
    <span class="nuda-empty-box__dust nuda-empty-box__dust--b"></span>
    <span class="nuda-empty-box__dust nuda-empty-box__dust--c"></span>
    <svg class="nuda-empty-box__svg" viewBox="0 0 64 56"
         fill="none" stroke="currentColor" stroke-width="2"
         stroke-linecap="round" stroke-linejoin="round">
      <path class="nuda-empty-box__lid" d="M8 18 L32 6 L56 18 L32 28 Z" />
      <path d="M8 18 L8 44 L32 54 L56 44 L56 18" />
      <path d="M32 28 L32 54" opacity="0.5" />
    </svg>
  </div>
  <p class="nuda-empty-box__text">No data found</p>
</div>
CSS
/* Empty Box
   Open cardboard box with floating dust particles.
   Customize: --empty-box-color, --empty-box-text, --empty-box-size */

.nuda-empty-box {
  --empty-box-color: #e4ff54;
  --empty-box-text: rgba(255, 255, 255, 0.55);
  --empty-box-size: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--empty-box-color);
}

.nuda-empty-box__scene {
  position: relative;
  width: var(--empty-box-size);
  height: calc(var(--empty-box-size) * 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: nuda-empty-box-bob 3.4s ease-in-out infinite;
}

.nuda-empty-box__svg {
  width: 100%;
  height: 100%;
  color: currentColor;
  filter: drop-shadow(0 0 6px rgba(228, 255, 84, 0.15));
}

.nuda-empty-box__lid {
  transform-origin: 32px 18px;
  animation: nuda-empty-box-lid 3.4s ease-in-out infinite;
}

.nuda-empty-box__dust {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  box-shadow: 0 0 6px currentColor;
}

.nuda-empty-box__dust--a { left: 30%; top: 36%; animation: nuda-empty-box-dust 2.6s ease-in-out infinite; }
.nuda-empty-box__dust--b { left: 50%; top: 42%; animation: nuda-empty-box-dust 2.6s ease-in-out 0.6s infinite; }
.nuda-empty-box__dust--c { left: 62%; top: 36%; animation: nuda-empty-box-dust 2.6s ease-in-out 1.2s infinite; }

.nuda-empty-box__text {
  font: 500 12px ui-sans-serif, system-ui, sans-serif;
  color: var(--empty-box-text);
  letter-spacing: 0.02em;
  margin: 0;
}

@keyframes nuda-empty-box-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

@keyframes nuda-empty-box-lid {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(-4deg); }
}

@keyframes nuda-empty-box-dust {
  0%   { opacity: 0; transform: translateY(4px) scale(0.4); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-18px) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .nuda-empty-box__scene,
  .nuda-empty-box__lid,
  .nuda-empty-box__dust {
    animation: none;
  }
}

How to use Empty Box

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.

More empty states components

← Browse all NudaUI components