{
  "id": "progress-button",
  "name": "Progress Button",
  "category": "buttons",
  "tags": [
    "upload",
    "fill",
    "percentage",
    "loading",
    "custom property"
  ],
  "description": "A button that fills from left to right to show upload progress, set with one custom property.",
  "url": "https://copy-css.com/snippets/progress-button",
  "markdown": "https://copy-css.com/snippets/progress-button.md",
  "html": "<button class=\"btn-progress\" style=\"--progress: 65%\" aria-busy=\"true\">Uploading… 65%</button>",
  "css": ".btn-progress {\n  --progress: 0%;\n  position: relative;\n  isolation: isolate;\n  overflow: hidden;\n  min-width: 220px;\n  padding: 14px 28px;\n  border: 0;\n  border-radius: 10px;\n  background: #1e3a8a;\n  color: #fff;\n  font: 600 16px/1 system-ui, sans-serif;\n  font-variant-numeric: tabular-nums;\n  cursor: pointer;\n}\n\n.btn-progress::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  width: var(--progress);\n  background: #2563eb;\n  transition: width 0.3s ease;\n}\n\n.btn-progress[aria-busy=\"true\"] {\n  cursor: progress;\n}\n\n.btn-progress:focus-visible {\n  outline: 3px solid #2563eb;\n  outline-offset: 3px;\n}",
  "features": [
    "transitions",
    "keyboard focus styles",
    "custom properties"
  ],
  "customProperties": [
    {
      "name": "--progress",
      "value": "0%"
    }
  ]
}
