01 Floating Label Input — label animates above the field when the input gains focus
▶ live preview — click to focus each field
HTML
<div class="fl-group">
  <input
    class="fl-input"
    type="text"
    id="name"
    placeholder=" "
  />
  <label
    class="fl-label"
    for="name"
  >Full Name</label>
</div>
CSS
.fl-group { position: relative; }
.fl-input {
  padding: 1.2rem 1rem 0.45rem;
  border: 1px solid #2a2f42;
  border-radius: 8px;
  background: #1c2030;
  color: #e4e8f0;
  width: 100%;
}
.fl-input:focus {
  border-color: #5af0c4;
  outline: none;
}
.fl-label {
  position: absolute;
  top: 50%; left: 1rem;
  transform: translateY(-50%);
  color: #6b7390;
  pointer-events: none;
  transition: top 0.2s, font-size 0.2s;
}
.fl-input:focus ~ .fl-label,
.fl-input:not(:placeholder-shown) ~ .fl-label {
  top: 0.45rem;
  font-size: 0.65rem;
  color: #5af0c4;
}
02 Styled Checkbox — hidden native input replaced with a CSS-animated custom box
▶ live preview — click to toggle
HTML
<label class="check-label">
  <input type="checkbox"/>
  <span class="check-box"></span>
  Accept terms & conditions
</label>
CSS
.check-label input[type="checkbox"] {
  display: none;
}
.check-box {
  width: 18px; height: 18px;
  border: 2px solid #2a2f42;
  border-radius: 5px;
  background: #1c2030;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.check-box::after {
  content: '';
  width: 5px; height: 9px;
  border-right: 2px solid #0d0f14;
  border-bottom: 2px solid #0d0f14;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}
input:checked ~ .check-box {
  background: #5af0c4;
  border-color: #5af0c4;
}
input:checked ~ .check-box::after {
  transform: rotate(45deg) scale(1);
}
03 Glassmorphism Login Form — frosted glass card with blurred gradient background
▶ live preview — click inputs to focus

Welcome back

// sign in to your account

HTML
<!-- needs a colourful parent -->
<div class="gradient-bg">
  <form class="glass-form">
    <h2>Welcome back</h2>
    <div class="field">
      <label>Email</label>
      <input type="email"
        placeholder="you@example.com"/>
    </div>
    <div class="field">
      <label>Password</label>
      <input type="password"
        placeholder="••••••••"/>
    </div>
    <button type="submit">Sign In</button>
  </form>
</div>
CSS
.glass-form {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 2rem;
  color: white;
}
.glass-form input {
  width: 100%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  outline: none;
}
.glass-form input:focus {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.18);
}
.gradient-bg {
  background: linear-gradient(135deg,
    #7c3aed, #0ea5e9, #10b981);
  padding: 2.5rem;
}