{
  "id": "icon-label-button",
  "name": "Icon Label Button",
  "category": "buttons",
  "tags": [
    "leading icon",
    "trailing icon",
    "svg",
    "inline-flex",
    "action"
  ],
  "description": "Buttons with an SVG icon beside the label, perfectly aligned with flexbox and gap.",
  "url": "https://copy-css.com/snippets/icon-label-button",
  "markdown": "https://copy-css.com/snippets/icon-label-button.md",
  "html": "<button class=\"btn-icon-label\">\n  <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M12 5v14M5 12h14\"/></svg>\n  New project\n</button>\n<button class=\"btn-icon-label btn-icon-label-light\">\n  Export\n  <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M12 3v12\"/><path d=\"m7 10 5 5 5-5\"/><path d=\"M5 21h14\"/></svg>\n</button>",
  "css": ".btn-icon-label {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  padding: 12px 20px;\n  border: 1px solid transparent;\n  border-radius: 10px;\n  background: #0f172a;\n  color: #fff;\n  font: 600 15px/1 system-ui, sans-serif;\n  cursor: pointer;\n  transition: background-color 0.2s ease;\n}\n\n.btn-icon-label svg {\n  flex: none;\n  width: 18px;\n  height: 18px;\n  fill: none;\n  stroke: currentColor;\n  stroke-width: 2.2;\n  stroke-linecap: round;\n  stroke-linejoin: round;\n}\n\n.btn-icon-label:hover {\n  background: #1e293b;\n}\n\n.btn-icon-label-light {\n  border-color: #cbd5e1;\n  background: #fff;\n  color: #0f172a;\n}\n\n.btn-icon-label-light:hover {\n  background: #f1f5f9;\n}\n\n.btn-icon-label:focus-visible {\n  outline: 2px solid #0f172a;\n  outline-offset: 3px;\n}",
  "features": [
    "transitions",
    "Flexbox",
    "keyboard focus styles"
  ],
  "customProperties": []
}
