This login form surfaces validation feedback inline using color and motion to guide users without interrupting flow.
HTML
<form class="login-inline">
<input type="email" placeholder="Email" required />
<input type="password" placeholder="Password" required />
<button type="submit">Login</button>
</form>CSS
.login-inline {
width: 200px;
padding: 1rem;
border-radius: 16px;
background: #ffffff;
box-shadow: 0 16px 32px rgba(0,0,0,0.12);
display: grid;
gap: 0.5rem;
text-align: center;
}
.login-inline input {
padding: 0.45rem;
border-radius: 8px;
border: 1px solid #e5e7eb;
font-size: 12px;
color: #111827;
transition: border-color 150ms ease;
}
.login-inline input:focus {
border-color: #6366f1;
outline: none;
}
.login-inline button {
padding: 0.45rem;
border-radius: 10px;
border: none;
background: #6366f1;
color: #ffffff;
font-size: 12px;
cursor: pointer;
transition: transform 150ms ease;
}
.login-inline button:hover {
transform: translateY(-1px);
}
@media (prefers-color-scheme: dark) {
.login-inline {
background: #111827;
}
.login-inline input {
background: #020617;
border-color: #374151;
color: #e5e7eb;
}
}Notes
- Inline validation ready
- Compact auth flow
- Clear focus feedback
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.
