Skip to content

Magic Link

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

Login & AuthHTMLCSSany framework

Check your inbox

We sent a magic link to you@nudaui.dev

Copy into your project

HTML
<div class="nuda-magic" role="status">
  <div class="nuda-magic__icon">
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
      <path d="M4 7l8 6 8-6" />
      <rect x="3" y="5" width="18" height="14" rx="2" />
    </svg>
    <span class="nuda-magic__sparkle nuda-magic__sparkle--1"></span>
    <span class="nuda-magic__sparkle nuda-magic__sparkle--2"></span>
    <span class="nuda-magic__sparkle nuda-magic__sparkle--3"></span>
  </div>
  <div class="nuda-magic__body">
    <h4>Check your inbox</h4>
    <p>We sent a magic link to you@nudaui.dev</p>
  </div>
</div>
CSS
.nuda-magic {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: rgba(228,255,84,.04);
  border: 1px solid rgba(228,255,84,.18);
  border-radius: 14px;
  width: 100%;
  max-width: 320px;
  animation: _magicIn .65s cubic-bezier(.16,1,.3,1) both;
}

.nuda-magic__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(228,255,84,.1);
  color: #e4ff54;
  flex-shrink: 0;
  animation: _magicPulse 2.2s ease-in-out infinite;
}

.nuda-magic__icon svg {
  width: 20px;
  height: 20px;
}

.nuda-magic__sparkle {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #e4ff54;
  border-radius: 50%;
  box-shadow: 0 0 8px #e4ff54;
  animation: _magicSparkle 2.4s ease-in-out infinite;
}

.nuda-magic__sparkle--1 {
  top: -2px;
  right: -2px;
  animation-delay: 0s;
}

.nuda-magic__sparkle--2 {
  bottom: 0;
  left: -3px;
  animation-delay: .6s;
  width: 3px;
  height: 3px;
}

.nuda-magic__sparkle--3 {
  top: 50%;
  right: -6px;
  animation-delay: 1.2s;
  width: 4px;
  height: 4px;
}

.nuda-magic__body h4 {
  margin: 0 0 2px;
  color: #fafafa;
  font-size: 14px;
  font-weight: 600;
}

.nuda-magic__body p {
  margin: 0;
  color: #a0a0a8;
  font-size: 12px;
}

@keyframes _magicIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes _magicPulse {
  0%,100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes _magicSparkle {
  0%,100% {
    opacity: 0;
    transform: scale(.4);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-magic,.nuda-magic__icon,.nuda-magic__sparkle {
    animation: none;
  }
}

How to use Magic Link

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 login & auth components

← Browse all NudaUI components