This signup form includes a required terms and conditions checkbox to ensure user consent and compliance.
HTML
<form class="signup-terms">
<input type="email" placeholder="Email" required>
<input type="password" placeholder="Password" required>
<label>
<input type="checkbox" required>
I agree to the terms
</label>
<button type="button">Register</button>
</form>CSS
:root{
--bg:#f8fafc;
--card:#ffffff;
--text:#0f172a;
--muted:#64748b;
--border:#e5e7eb;
--primary:#4f46e5;
--primary-dark:#4338ca;
}
@media (prefers-color-scheme: dark){
:root{
--bg:#020617;
--card:#020617;
--text:#e5e7eb;
--muted:#94a3b8;
--border:#1f2937;
--primary:#6366f1;
--primary-dark:#818cf8;
}
}
.signup-terms{
max-width:240px;
margin:auto;
padding:16px;
background:var(--card);
border-radius:16px;
border:1px solid var(--border);
box-shadow:0 10px 30px rgba(0,0,0,.08);
font-size:12px;
color:var(--text);
}
.signup-terms input[type="email"],
.signup-terms input[type="password"]{
width:100%;
padding:11px 14px;
margin-bottom:12px;
border-radius:12px;
border:1px solid var(--border);
background:linear-gradient(
180deg,
var(--card),
var(--bg)
);
color:var(--text);
font-size:12px;
font-weight:500;
outline:none;
transition:
border .2s ease,
box-shadow .2s ease,
transform .15s ease;
}
.signup-terms input::placeholder{
color:var(--muted);
font-weight:400;
}
.signup-terms input:focus{
border-color:var(--primary);
box-shadow:
0 0 0 3px rgba(79,70,229,.18),
inset 0 1px 0 rgba(255,255,255,.4);
transform:translateY(-1px);
}
.signup-terms label{
display:flex;
align-items:center;
gap:8px;
margin:6px 0 14px;
font-size:11px;
color:var(--muted);
}
.signup-terms label input{
width:14px;
height:14px;
accent-color:var(--primary);
cursor:pointer;
}
.signup-terms button{
width:100%;
padding:11px;
border:none;
border-radius:12px;
background:linear-gradient(
135deg,
var(--primary),
var(--primary-dark)
);
color:#ffffff;
font-size:12px;
font-weight:600;
cursor:pointer;
transition:
transform .15s ease,
box-shadow .15s ease,
opacity .2s ease;
}
.signup-terms button:hover{
transform:translateY(-1px);
box-shadow:0 8px 20px rgba(0,0,0,.18);
}
.signup-terms button:active{
transform:translateY(0);
box-shadow:none;
}
.signup-terms button:disabled{
opacity:.6;
cursor:not-allowed;
box-shadow:none;
}Notes
- Compliance-ready UI
- Clear consent flow
- Familiar UX pattern
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.
