{
  "id": "power-toggle-button",
  "name": "Power Toggle Button",
  "category": "buttons",
  "tags": [
    "on off",
    "glow",
    "checkbox",
    "switch",
    "dark"
  ],
  "description": "A round power button that lights up with a cyan glow when switched on, using a hidden checkbox.",
  "url": "https://copy-css.com/snippets/power-toggle-button",
  "markdown": "https://copy-css.com/snippets/power-toggle-button.md",
  "html": "<label class=\"btn-power\">\n  <input type=\"checkbox\" aria-label=\"Power\">\n  <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M12 3v8\"/><path d=\"M6.3 6.8a8 8 0 1 0 11.4 0\"/></svg>\n</label>",
  "css": ".btn-power {\n  position: relative;\n  display: inline-grid;\n  place-items: center;\n  width: 84px;\n  height: 84px;\n  border-radius: 50%;\n  background: linear-gradient(145deg, #1f2937, #111827);\n  color: #4b5563;\n  box-shadow:\n    inset 0 1px 0 #374151,\n    0 10px 24px #00000099;\n  cursor: pointer;\n  transition: color 0.3s ease, box-shadow 0.3s ease;\n}\n\n.btn-power input {\n  position: absolute;\n  inset: 0;\n  margin: 0;\n  opacity: 0;\n  cursor: pointer;\n}\n\n.btn-power svg {\n  width: 34px;\n  height: 34px;\n  fill: none;\n  stroke: currentColor;\n  stroke-width: 2.4;\n  stroke-linecap: round;\n  pointer-events: none;\n  transition: filter 0.3s ease;\n}\n\n.btn-power:hover {\n  color: #6b7280;\n}\n\n.btn-power:has(input:checked) {\n  color: #22d3ee;\n  box-shadow:\n    inset 0 1px 0 #374151,\n    0 0 0 2px #22d3ee66,\n    0 0 32px #22d3ee66;\n}\n\n.btn-power:has(input:checked) svg {\n  filter: drop-shadow(0 0 6px #22d3ee);\n}\n\n.btn-power:has(input:focus-visible) {\n  outline: 2px solid #67e8f9;\n  outline-offset: 5px;\n}",
  "features": [
    "transitions",
    "linear gradients",
    "box shadows",
    "filters",
    "CSS Grid",
    "the :has() selector",
    "the :checked state (no JavaScript)",
    "keyboard focus styles"
  ],
  "customProperties": []
}
