Minimalist 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>Minimalist Radio Button</title> <style> body { font-family: Arial, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; background: #fff; } .radio-group { display: flex; gap: 20px; } .radio { display: none; } .radio-label { position: relative; display: flex; align-items: center; cursor: pointer; font-size: 18px; padding-left: 40px; color: #333; } .radio-label:before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; border: 2px solid #333; background: #fff; transition: background-color 0.3s, border-color 0.3s; } .radio:checked + .radio-label:before { background: #333; border-color: #333; } </style> </head> <body> <div class="radio-group"> <input type="radio" id="minimal1" name="minimals" class="radio" checked> <label for="minimal1" class="radio-label"> <span>Minimal 1</span> </label> <input type="radio" id="minimal2" name="minimals" class="radio"> <label for="minimal2" class="radio-label"> <span>Minimal 2</span> </label> <input type="radio" id="minimal3" name="minimals" class="radio"> <label for="minimal3" class="radio-label"> <span>Minimal 3</span> </label> </div> </body> </html>