Snippets Form

Bootstrap 5 Neumorphic Login and Signup Form

A soft neomorphic login and sign-up card with an inset segmented switch that swaps between the two modes. Fields and buttons press in and lift out with paired light and dark shadows.

Bootstrap 5 No jQuery Mar 2020 2.5K views

<section class="wdw-stage">
  <div class="container" style="max-width:560px">
    <div class="wdw-card neo-card p-4 p-sm-5">
      <div class="text-center mb-4">
        <span class="wdw-icon neo-badge mb-3" aria-hidden="true"><svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="10" width="16" height="10" rx="3"/><path d="M8 10V7a4 4 0 018 0v3"/></svg></span>
        <h1 class="h2 wdw-heading mb-1" id="neoTitle">Welcome back</h1>
        <p class="wdw-muted mb-0" id="neoSub">Log in to pick up where you left off.</p>
      </div>
      <div class="neo-seg btn-group w-100 mb-4 rounded-pill" role="group" aria-label="Account">
        <input type="radio" class="btn-check" name="neoMode" id="neoLogin" value="login" autocomplete="off" checked>
        <label class="btn rounded-pill" for="neoLogin">Log in</label>
        <input type="radio" class="btn-check" name="neoMode" id="neoSignup" value="signup" autocomplete="off">
        <label class="btn rounded-pill" for="neoSignup">Sign up</label>
      </div>
      <form id="neoForm" novalidate>
        <div class="mb-3 neo-only-signup" hidden>
          <label for="neoName" class="form-label small fw-semibold">Full name</label>
          <input type="text" class="form-control neo-input" id="neoName" placeholder="Alex Morgan" autocomplete="name">
          <div class="invalid-feedback">Please enter your name.</div>
        </div>
        <div class="mb-3">
          <label for="neoEmail" class="form-label small fw-semibold">Email</label>
          <input type="email" class="form-control neo-input" id="neoEmail" placeholder="[email protected]" autocomplete="email" required>
          <div class="invalid-feedback">Enter a valid email address.</div>
        </div>
        <div class="mb-3">
          <label for="neoPass" class="form-label small fw-semibold">Password</label>
          <input type="password" class="form-control neo-input" id="neoPass" placeholder="At least 8 characters" autocomplete="current-password" minlength="8" required>
          <div class="invalid-feedback">Use at least 8 characters.</div>
        </div>
        <div class="d-flex justify-content-between align-items-center mb-4 small neo-only-login">
          <div class="form-check mb-0"><input class="form-check-input" type="checkbox" id="neoRemember"><label class="form-check-label" for="neoRemember">Remember me</label></div>
          <a href="#" class="fw-semibold text-decoration-none">Forgot password?</a>
        </div>
        <button type="submit" class="btn btn-primary rounded-pill w-100 mt-2" id="neoSubmit">Log in</button>
        <div class="alert alert-success mt-3 mb-0 py-2 small" role="status" id="neoOk" hidden></div>
      </form>
    </div>
  </div>
</section>

Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.

Free to use in personal and commercial projects under the MIT license.