Skip to content

Lockout Card

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

Login & AuthHTMLCSSany framework

Copy into your project

HTML
<div class="nuda-au2-lockout-card" role="alert">
  <div class="nuda-au2-lockout-card__icon" aria-hidden="true">
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
      <path d="M12 9v4" />
      <path d="M10.3 3.6 2.6 17a1.6 1.6 0 0 0 1.4 2.4h16a1.6 1.6 0 0 0 1.4-2.4L13.7 3.6a1.6 1.6 0 0 0-2.8 0Z" />
      <circle cx="12" cy="16.2" r="0.1"></circle>
    </svg>
  </div>
  <div class="nuda-au2-lockout-card__title">Too many attempts</div>
  <p class="nuda-au2-lockout-card__sub">Your account is temporarily locked.</p>
  <div class="nuda-au2-lockout-card__timerwrap">
    <div class="nuda-au2-lockout-card__timerbar" aria-hidden="true">
      <span class="nuda-au2-lockout-card__timerfill"></span>
    </div>
    <span class="nuda-au2-lockout-card__timertext">Try again in 2:00</span>
  </div>
  <button class="nuda-au2-lockout-card__cta" type="button" disabled>Sign in</button>
</div>
CSS
.nuda-au2-lockout-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  width: 100%;
  max-width: 280px;
  background: #0a0a0a;
  border: 1px solid rgba(255,120,120,.25);
  border-radius: 16px;
}

.nuda-au2-lockout-card__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,120,120,.12);
  color: #ff8a8a;
}

.nuda-au2-lockout-card__icon svg {
  width: 18px;
  height: 18px;
}

.nuda-au2-lockout-card__title {
  color: #fafafa;
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}

.nuda-au2-lockout-card__sub {
  color: #a0a0a8;
  font-size: 11.5px;
  margin: 0;
}

.nuda-au2-lockout-card__timerwrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.nuda-au2-lockout-card__timerbar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}

.nuda-au2-lockout-card__timerfill {
  position: absolute;
  inset: 0;
  background: #ff8a8a;
  transform-origin: left;
  transform: scaleX(1);
  animation: nuda-au2-lockout-card-drain 30s linear infinite;
}

.nuda-au2-lockout-card__timertext {
  color: #777;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.nuda-au2-lockout-card__cta {
  min-height: 44px;
  padding: 10px;
  background: rgba(255,255,255,.06);
  color: #777;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: not-allowed;
}

.nuda-au2-lockout-card__cta:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

@keyframes nuda-au2-lockout-card-drain {
  0% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0);
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-au2-lockout-card__timerfill {
    animation: none;
    transform: scaleX(.15);
  }
}

How to use Lockout Card

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