Skip to content

Astronaut Lost

A copy-paste error & 404 pages component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

Error & 404 PagesHTMLCSSany framework

404

Lost in space

Copy into your project

HTML
<div class="nuda-err-astro">
  <div class="nuda-err-astro__scene">
    <div class="nuda-err-astro__planet"></div>
    <div class="nuda-err-astro__ring"></div>
    <div class="nuda-err-astro__body">
      <div class="nuda-err-astro__helmet">
        <div class="nuda-err-astro__visor"></div>
      </div>
      <div class="nuda-err-astro__torso">
        <div class="nuda-err-astro__arm nuda-err-astro__arm--l"></div>
        <div class="nuda-err-astro__arm nuda-err-astro__arm--r"></div>
      </div>
    </div>
    <span class="nuda-err-astro__star nuda-err-astro__star--a"></span>
    <span class="nuda-err-astro__star nuda-err-astro__star--b"></span>
    <span class="nuda-err-astro__star nuda-err-astro__star--c"></span>
  </div>
  <p class="nuda-err-astro__code">404</p>
  <p class="nuda-err-astro__msg">Lost in space</p>
</div>
CSS
.nuda-err-astro {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: #0a0a14;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  text-align: center;
  width: 100%;
  max-width: 260px;
}

.nuda-err-astro__scene {
  position: relative;
  width: 120px;
  height: 100px;
  margin-bottom: 8px;
}

.nuda-err-astro__planet {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 26px;
  background: radial-gradient(ellipse at 40% 40%,#2a1a4e,#100a20);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(100,60,220,.4);
}

.nuda-err-astro__ring {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 12px;
  border: 2px solid rgba(150,100,255,.5);
  border-radius: 50%;
  pointer-events: none;
}

.nuda-err-astro__body {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: _nuda-errastro-float 3.6s ease-in-out infinite;
}

.nuda-err-astro__helmet {
  width: 26px;
  height: 26px;
  background: #cfcfcf;
  border-radius: 50%;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 0 8px rgba(255,255,255,.15);
}

.nuda-err-astro__visor {
  position: absolute;
  top: 7px;
  left: 5px;
  width: 16px;
  height: 10px;
  background: linear-gradient(135deg,#6bfff8,#2266cc);
  border-radius: 4px;
  opacity: .9;
}

.nuda-err-astro__torso {
  width: 22px;
  height: 18px;
  background: #a0a0b0;
  border-radius: 4px;
  margin: 2px auto 0;
  position: relative;
}

.nuda-err-astro__arm {
  position: absolute;
  top: 2px;
  width: 6px;
  height: 14px;
  background: #a0a0b0;
  border-radius: 3px;
}

.nuda-err-astro__arm--l {
  left: -7px;
  transform: rotate(-15deg);
  transform-origin: top center;
}

.nuda-err-astro__arm--r {
  right: -7px;
  transform: rotate(15deg);
  transform-origin: top center;
}

.nuda-err-astro__star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fafafa;
}

.nuda-err-astro__star--a {
  top: 10px;
  left: 14px;
  animation: _nuda-errastro-twinkle 2s .2s ease-in-out infinite;
}

.nuda-err-astro__star--b {
  top: 20px;
  right: 10px;
  animation: _nuda-errastro-twinkle 2s .8s ease-in-out infinite;
}

.nuda-err-astro__star--c {
  top: 30px;
  left: 8px;
  width: 1px;
  height: 1px;
  animation: _nuda-errastro-twinkle 2s 1.4s ease-in-out infinite;
}

.nuda-err-astro__code {
  font-size: 32px;
  font-weight: 800;
  color: #e4ff54;
  font-family: ui-monospace,monospace;
  letter-spacing: -.03em;
  margin: 0 0 2px;
  line-height: 1;
}

.nuda-err-astro__msg {
  color: #777;
  font-size: 11px;
  margin: 0;
}

@keyframes _nuda-errastro-float {
  0%,100% {
    transform: translateX(-50%) translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateX(-50%) translateY(-10px) rotate(3deg);
  }
}

@keyframes _nuda-errastro-twinkle {
  0%,100% {
    opacity: .3;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-err-astro__body {
    animation: none;
  }
  .nuda-err-astro__star--a,.nuda-err-astro__star--b,.nuda-err-astro__star--c {
    animation: none;
  }
}

How to use Astronaut Lost

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 error & 404 pages components

← Browse all NudaUI components