Verification Code Reset Form

This reset form supports verification-code-based password recovery using segmented inputs.

HTML

<form class="reset-code">
  <div class="reset-code__inputs">
    <input maxlength="1" />
    <input maxlength="1" />
    <input maxlength="1" />
    <input maxlength="1" />
  </div>
  <button type="submit">Verify Code</button>
</form>

CSS

.reset-code {
  width: 200px;
  padding: 1rem;
  border-radius: 16px;
  background: #f9fafb;
  display: grid;
  gap: 0.75rem;
  text-align: center;
}

.reset-code__inputs {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

.reset-code__inputs input {
  width: 32px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  text-align: center;
  font-size: 14px;
  transition: border-color 150ms ease, transform 150ms ease;
}

.reset-code__inputs input:focus {
  border-color: #6366f1;
  transform: scale(1.05);
  outline: none;
}

.reset-code button {
  padding: 0.45rem;
  border-radius: 10px;
  border: none;
  background: #6366f1;
  color: #ffffff;
  font-size: 12px;
}

@media (prefers-color-scheme: dark) {
  .reset-code {
    background: #020617;
    color: #e5e7eb;
  }

  .reset-code__inputs input {
    background: #111827;
    border-color: #374151;
    color: #e5e7eb;
  }
}

Notes

  • Suitable for email or SMS-based recovery
  • Clear digit separation
  • Compact and touch-friendly

Preview styles shown. Production customization recommended.

Browse More UI Components

Explore hundreds of reusable HTML & CSS UI components built for modern web projects.
Discover buttons, cards, loaders, animations, layouts, and more all with live previews and clean, copy-paste code.

Leave a Reply

Your email address will not be published. Required fields are marked *