{
  "id": "custom-radio",
  "name": "Custom Radio Buttons",
  "category": "forms",
  "tags": [
    "radio",
    "custom",
    "appearance",
    "form",
    "options"
  ],
  "description": "Restyled native radio buttons with a dot that pops in, using appearance: none.",
  "url": "https://copy-css.com/snippets/custom-radio",
  "markdown": "https://copy-css.com/snippets/custom-radio.md",
  "html": "<div class=\"radios\">\n  <label><input type=\"radio\" name=\"plan\" checked> Starter</label>\n  <label><input type=\"radio\" name=\"plan\"> Team</label>\n  <label><input type=\"radio\" name=\"plan\"> Enterprise</label>\n</div>",
  "css": ".radios {\n  display: grid;\n  gap: 12px;\n  color: #27272a;\n  font: 500 15px system-ui, sans-serif;\n}\n\n.radios label {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  cursor: pointer;\n}\n\n.radios input {\n  display: grid;\n  place-content: center;\n  width: 20px;\n  height: 20px;\n  margin: 0;\n  border: 2px solid #a1a1aa;\n  border-radius: 50%;\n  -webkit-appearance: none;\n  appearance: none;\n  cursor: pointer;\n  transition: border-color 0.2s ease;\n}\n\n.radios input::before {\n  content: \"\";\n  width: 10px;\n  height: 10px;\n  border-radius: 50%;\n  background: #10b981;\n  transform: scale(0);\n  transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.6, 1);\n}\n\n.radios input:hover {\n  border-color: #71717a;\n}\n\n.radios input:checked {\n  border-color: #10b981;\n}\n\n.radios input:checked::before {\n  transform: scale(1);\n}\n\n.radios input:focus-visible {\n  outline: 2px solid #10b981;\n  outline-offset: 2px;\n}",
  "features": [
    "transitions",
    "transforms",
    "CSS Grid",
    "Flexbox",
    "the :checked state (no JavaScript)",
    "keyboard focus styles"
  ],
  "customProperties": []
}
