{
  "id": "semicircle-gauge",
  "name": "Semicircle Gauge",
  "category": "loaders",
  "tags": [
    "meter",
    "conic-gradient",
    "dashboard",
    "score",
    "speedometer"
  ],
  "description": "A half-circle gauge drawn with a conic gradient and a mask, showing a score from 0 to 100.",
  "url": "https://copy-css.com/snippets/semicircle-gauge",
  "markdown": "https://copy-css.com/snippets/semicircle-gauge.md",
  "html": "<div class=\"gauge-semi\" style=\"--value: 68\" role=\"meter\" aria-label=\"Score\" aria-valuenow=\"68\" aria-valuemin=\"0\" aria-valuemax=\"100\">68</div>",
  "css": ".gauge-semi {\n  --value: 0;\n  position: relative;\n  display: grid;\n  place-items: end center;\n  width: 200px;\n  aspect-ratio: 2 / 1;\n  overflow: hidden;\n  color: #78350f;\n  font: 800 40px/1 system-ui, sans-serif;\n}\n\n/* A full ring, with its bottom half hidden by overflow */\n.gauge-semi::before {\n  content: \"\";\n  position: absolute;\n  inset: 0 0 -100%;\n  border-radius: 50%;\n  background: conic-gradient(\n    from -90deg,\n    #f59e0b calc(var(--value) * 1.8deg),\n    #fde68a 0 180deg,\n    #0000 0\n  );\n  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 22px), #000 calc(100% - 21px));\n  mask: radial-gradient(farthest-side, #0000 calc(100% - 22px), #000 calc(100% - 21px));\n}",
  "features": [
    "radial gradients",
    "conic gradients",
    "masks",
    "CSS Grid",
    "aspect-ratio",
    "custom properties"
  ],
  "customProperties": [
    {
      "name": "--value",
      "value": "0"
    }
  ]
}
