Forms & Interactive Inputs 5 Production-Ready Templates

Modern Form Inputs & UX Tutorials

Boost conversion and reduce user friction with modern animated floating labels, password reveal toggles with live strength scoring, 3D interactive flip credit cards, and multi-step progress forms.

Zero JS Floating Labels 3D Card Flip & Steppers 1-Click Code Copy
Pure CSS Animation

1. Floating Label Animated Input

Clean Material/iOS style floating label elevating smoothly on focus and text entry.

<div class="floating-group">
  <input type="email" id="email" class="floating-input" placeholder=" " required>
  <label for="email" class="floating-label">Email Address</label>
</div>
Security UX

2. Password Input with Reveal Eye & Strength Meter

Live password strength visualizer measuring length, numbers, and symbols in real-time.

Enter password to check strength
<div class="password-box">
  <label class="input-label">Create Password</label>
  <div class="input-wrapper">
    <input type="password" id="userPass" placeholder="Enter password" class="pass-input" oninput="evalStrength(this.value)">
    <button type="button" id="togglePassBtn" class="toggle-eye" onclick="togglePassVisibility()">👁️</button>
  </div>
  <div class="strength-track">
    <div id="strengthBar" class="strength-fill"></div>
  </div>
  <span id="strengthText" class="strength-msg">Password strength indicator</span>
</div>
2FA & Auth Flow

3. 6-Digit OTP / PIN Verification Box

Smooth auto-advancing focus, backspace navigation, and full-clipboard paste support.

Enter 6-Digit Code (Try typing or pasting)
<div class="otp-container" id="otpBox">
  <input type="text" maxlength="1" class="otp-field" autofocus>
  <input type="text" maxlength="1" class="otp-field">
  <input type="text" maxlength="1" class="otp-field">
  <input type="text" maxlength="1" class="otp-field">
  <input type="text" maxlength="1" class="otp-field">
  <input type="text" maxlength="1" class="otp-field">
</div>
Interactive 3D Transform

4. 3D Flip Credit Card & Live Formatter

Realistic 3D payment card that flips automatically on CVV focus with dynamic number spacing.

VISA
•••• •••• •••• ••••
Security Code
•••
Encrypted 256-Bit SSL
<div class="payment-checkout-card">
  <!-- 3D Card Scene -->
  <div class="card-3d-scene">
    <div id="creditCard" class="card-3d-flipper">
      <!-- Front Face -->
      <div class="card-face card-front">
        <div class="card-header">
          <div class="card-chip"></div>
          <span class="card-brand">VISA</span>
        </div>
        <div id="dispCardNum" class="card-number">•••• •••• •••• ••••</div>
        <div class="card-footer">
          <div>
            <span class="card-label">Card Holder</span>
            <span id="dispCardName" class="card-value">YOUR NAME</span>
          </div>
          <div>
            <span class="card-label">Expires</span>
            <span id="dispCardExp" class="card-value">MM/YY</span>
          </div>
        </div>
      </div>

      <!-- Back Face -->
      <div class="card-face card-back">
        <div class="card-mag-strip"></div>
        <div class="card-cvv-box">
          <span class="cvv-label">Security Code</span>
          <div class="cvv-panel">
            <span id="dispCardCvv">•••</span>
          </div>
        </div>
        <div class="card-secure-text">Encrypted 256-Bit SSL</div>
      </div>
    </div>
  </div>

  <!-- Form Controls -->
  <form class="payment-form" onsubmit="return false;">
    <div class="form-group">
      <label for="cardNum" class="form-label">Card Number</label>
      <input type="text" id="cardNum" class="form-input" maxlength="19" placeholder="4532 0158 9632 7412" autocomplete="off">
    </div>
    <div class="form-row">
      <div class="form-group" style="flex: 2;">
        <label for="cardName" class="form-label">Cardholder Name</label>
        <input type="text" id="cardName" class="form-input" placeholder="John Doe" autocomplete="off">
      </div>
      <div class="form-group" style="flex: 1;">
        <label for="cardExp" class="form-label">Expires</label>
        <input type="text" id="cardExp" class="form-input" maxlength="5" placeholder="MM/YY" autocomplete="off">
      </div>
      <div class="form-group" style="flex: 1;">
        <label for="cardCvv" class="form-label">CVV</label>
        <input type="password" id="cardCvv" class="form-input" maxlength="4" placeholder="123" autocomplete="off">
      </div>
    </div>
  </form>
</div>
Multi-Step UX

5. Animated Multi-Step Stepper Wizard

Multi-step form wizard with animated progress track and step transitions.

1
2
3

1. Account Credentials

Enter your primary work email address to create your profile.

<div class="stepper-wizard-card">
  <!-- Progress Header -->
  <div class="stepper-track-wrap">
    <div class="track-line-bg"></div>
    <div id="stepTrackFill" class="track-line-fill"></div>
    <div id="step1" class="step-circle active">1</div>
    <div id="step2" class="step-circle">2</div>
    <div id="step3" class="step-circle">3</div>
  </div>

  <!-- Step Content Panels -->
  <div class="stepper-content-box">
    <div id="panel1" class="step-panel">
      <h4 class="step-title">1. Account Credentials</h4>
      <p class="step-desc">Enter your primary work email address.</p>
      <input type="email" class="stepper-input" placeholder="[email protected]">
    </div>

    <div id="panel2" class="step-panel hidden">
      <h4 class="step-title">2. Workspace Details</h4>
      <p class="step-desc">Choose your team subdomain.</p>
      <input type="text" class="stepper-input" placeholder="acme-team">
    </div>

    <div id="panel3" class="step-panel hidden text-center">
      <h4 class="step-title">3. Ready to Launch! 🎉</h4>
      <p class="step-desc">Your workspace is configured.</p>
    </div>

    <!-- Stepper Navigation Buttons -->
    <div class="stepper-footer">
      <button type="button" id="btnPrev" class="btn-step-prev" disabled>← Back</button>
      <button type="button" id="btnNext" class="btn-step-next">Continue →</button>
    </div>
  </div>
</div>

Frequently Asked Questions

How do CSS floating labels work without JavaScript?

By placing the <input> before the <label> in the DOM and using the CSS sibling selector input:focus ~ label or input:not(:placeholder-shown) ~ label with placeholder=' ' (a single space), the label animates up when focused or populated.

Does the 6-digit OTP box handle pasting entire verification codes?

Yes! The Vanilla JavaScript paste event listener automatically detects pasted text, distributes each digit into its corresponding box, and focuses on the final input.

How is the password strength score calculated?

The live strength meter runs regex checks for minimum length (8+ chars), numbers, uppercase letters, and special symbols, calculating an instant visual percentage score.