{
  "id": "filled-range-slider",
  "name": "Filled Range Slider",
  "category": "forms",
  "tags": [
    "range",
    "slider",
    "fill",
    "progress",
    "volume",
    "no javascript"
  ],
  "description": "A thick range slider that fills with color up to the thumb in every browser, using a clipped box-shadow trick.",
  "url": "https://copy-css.com/snippets/filled-range-slider",
  "markdown": "https://copy-css.com/snippets/filled-range-slider.md",
  "html": "<label class=\"range-fill\">\n  <span>Volume</span>\n  <input type=\"range\" min=\"0\" max=\"100\" value=\"65\">\n</label>",
  "css": ".range-fill {\n  --fill: #0284c7;\n  display: grid;\n  gap: 8px;\n  width: 240px;\n  color: #0c4a6e;\n  font: 600 13px system-ui, sans-serif;\n}\n\n.range-fill input {\n  height: 16px;\n  margin: 0;\n  overflow: hidden;\n  border-radius: 999px;\n  background: #e0f2fe;\n  -webkit-appearance: none;\n  appearance: none;\n  cursor: pointer;\n}\n\n.range-fill input::-webkit-slider-thumb {\n  width: 16px;\n  height: 16px;\n  border: 3px solid var(--fill);\n  border-radius: 50%;\n  background: #fff;\n  box-shadow: -408px 0 0 400px var(--fill);\n  -webkit-appearance: none;\n  appearance: none;\n}\n\n.range-fill input::-moz-range-thumb {\n  box-sizing: border-box;\n  width: 16px;\n  height: 16px;\n  border: 3px solid var(--fill);\n  border-radius: 50%;\n  background: #fff;\n}\n\n.range-fill input::-moz-range-progress {\n  height: 16px;\n  background: var(--fill);\n}\n\n.range-fill input:focus-visible {\n  outline: 2px solid var(--fill);\n  outline-offset: 3px;\n}",
  "features": [
    "box shadows",
    "CSS Grid",
    "keyboard focus styles",
    "custom properties"
  ],
  "customProperties": [
    {
      "name": "--fill",
      "value": "#0284c7"
    }
  ]
}
