DevPlatform
Home
Components
Search
Submit
Earn
Login
Sign Up Free
Wave Underline Input - Preview | DevPlatform
DevPlatform
Categories
Accordion
Animation
Box Shadow
Button
Card
Footer
Form
Gallery
Hero Section
Inputs
Loader
Marquee
Modal
Modules
Navbar
Progress Bar
Radio Buttons
Search-Bar
Sections
Slider
Tab
Timeline
Toggle
Wave Underline Input
abhishek001
Jan 25, 2026
6
0
Share
Live Preview
Refresh
Live Editor
HTML
CSS
JS
HTML
CSS
JavaScript
1
<div class="container"> <div class="input-box"> <input type="text" class="wave-input" required> <label class="wave-label">Username</label> <div class="wave-underline"></div> </div> </div>
1
* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', sans-serif; background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; } .container { width: 100%; max-width: 400px; } .input-box { position: relative; } .wave-input { width: 100%; padding: 1rem 0; font-size: 1.2rem; color: #fff; background: transparent; border: none; border-bottom: 2px solid rgba(255, 255, 255, 0.3); outline: none; transition: all 0.3s ease; } .wave-label { position: absolute; top: 1rem; left: 0; color: rgba(255, 255, 255, 0.7); font-size: 1.1rem; pointer-events: none; transition: all 0.3s ease; } .wave-input:focus ~ .wave-label, .wave-input:valid ~ .wave-label { top: -1.5rem; font-size: 0.9rem; color: #fff; font-weight: 600; } .wave-underline { position: absolute; bottom: 0; left: 0; width: 0; height: 3px; background: linear-gradient(90deg, #fff, #ffd700, #fff); background-size: 200% 100%; transition: width 0.4s ease; } .wave-input:focus ~ .wave-underline { width: 100%; animation: wave 1.5s ease-in-out infinite; } @keyframes wave { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } } @media (max-width: 768px) { .wave-input { font-size: 1rem; } .wave-label { font-size: 1rem; } }
1
Comments
0
Want to comment?
Please
login
or
sign up
to post comments.
No comments yet
Be the first to comment on this component!
Comments 0
Want to comment?
Please login or sign up to post comments.
No comments yet
Be the first to comment on this component!