Neumorphism Form - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Neumorphism Form</title> <style> body { font-family: 'Arial', sans-serif; background: #ecf0f3; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .form-container { background: #ecf0f3; border-radius: 30px; box-shadow: 13px 13px 20px #cbced1, -13px -13px 20px #ffffff; padding: 50px; width: 400px; animation: fadeIn 1s ease-in-out; } .form-container h1 { text-align: center; margin-bottom: 30px; color: #333; } .form-group { position: relative; margin-bottom: 30px; } .form-group input { width: 92%; padding: 15px; border: none; outline: none; background: #ecf0f3; border-radius: 50px; box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.6), inset -2px -2px 5px rgba(0, 0, 0, 0.2); font-size: 16px; transition: box-shadow 0.3s ease-in-out; } .form-group input:focus { box-shadow: 2px 2px 5px rgba(255, 255, 255, 0.6), -2px -2px 5px rgba(0, 0, 0, 0.2); } .form-group label { position: absolute; top: 0; left: 15px; padding: 15px; font-size: 16px; color: #999; pointer-events: none; transition: 0.3s; } .form-group input:focus ~ label, .form-group input:not(:placeholder-shown) ~ label { top: -35px; left: 15px; font-size: 12px; color: #666; } .form-group .icon { position: absolute; top: 15px; left: 15px; color: #999; transition: 0.3s; } .form-group input:focus ~ .icon, .form-group input:not(:placeholder-shown) ~ .icon { color: #666; } .form-group .icon svg { width: 20px; height: 20px; } .submit-btn { width: 100%; padding: 15px; border: none; outline: none; background: linear-gradient(to top left, rgba(0, 0, 0, .2), rgba(0, 0, 0, .2) 30%, rgba(0, 0, 0, 0)); border-radius: 50px; box-shadow: inset 2px 2px 3px rgba(255, 255, 255, 0.6), inset -2px -2px 3px rgba(0, 0, 0, 0.6); font-size: 16px; color: #fff; cursor: pointer; transition: all 0.3s ease-in-out; } .submit-btn:hover { background: linear-gradient(to top left, rgba(0, 0, 0, .1), rgba(0, 0, 0, .1) 30%, rgba(0, 0, 0, 0)); box-shadow: 2px 2px 3px rgba(255, 255, 255, 0.6), -2px -2px 3px rgba(0, 0, 0, 0.6); } @keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } } </style> </head> <body> <div class="form-container"> <h1>Sign Up</h1> <form> <div class="form-group"> <input type="text" id="username" placeholder=" " required> <label for="username">Username</label> </div> <div class="form-group"> <input type="email" id="email" placeholder=" " required> <label for="email">Email</label> </div> <div class="form-group"> <input type="password" id="password" placeholder=" " required> <label for="password">Password</label> </div> <button type="submit" class="submit-btn">Sign Up</button> </form> </div> </body> </html>