Neumorphism Radio Button - 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 Radio Button</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background: #f0f0f3; font-family: 'Arial', sans-serif; } .radio-container { display: flex; align-items: center; } .radio-button { appearance: none; width: 30px; height: 30px; border-radius: 50%; background: #e0e0e0; box-shadow: inset 2px 2px 3px rgba(255, 255, 255, .6), inset -2px -2px 3px rgba(0, 0, 0, .6); border: 2px solid #d0d0d0; outline: none; position: relative; cursor: pointer; transition: all 0.3s ease; background-image: linear-gradient(to top left, rgba(0, 0, 0, .2), rgba(0, 0, 0, .2) 30%, rgba(0, 0, 0, 0)); } .radio-button:checked { background: #b0bec5; border-color: #90a4ae; box-shadow: inset 2px 2px 3px rgba(255, 255, 255, .4), inset -2px -2px 3px rgba(0, 0, 0, .4); } .radio-button:checked::before { content: ''; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; border-radius: 50%; background: #00796b; transform: translate(-50%, -50%); transition: all 0.3s ease; box-shadow: 0 0 4px rgba(0, 0, 0, .4); } .radio-label { margin-left: 10px; font-size: 18px; color: #333; cursor: pointer; } .radio-button:focus { outline: none; box-shadow: 0 0 4px rgba(0, 0, 0, .3); } .radio-button:checked + .radio-label::before { content: '✔'; color: #00796b; font-size: 20px; margin-right: 8px; transition: all 0.3s ease; } </style> </head> <body> <div class="radio-container"> <input type="radio" id="radio1" name="radio-group" class="radio-button"> <label for="radio1" class="radio-label">Option 1</label> <input type="radio" id="radio2" name="radio-group" class="radio-button"> <label for="radio2" class="radio-label">Option 2</label> <input type="radio" id="radio3" name="radio-group" class="radio-button"> <label for="radio3" class="radio-label">Option 3</label> </div> </body> </html>