{
  "id": "floating-action-button",
  "name": "Floating Action Button",
  "category": "buttons",
  "tags": [
    "fab",
    "material",
    "plus",
    "fixed",
    "mobile"
  ],
  "description": "A Material-style floating action button pinned to the corner, with a plus icon that turns on hover.",
  "url": "https://copy-css.com/snippets/floating-action-button",
  "markdown": "https://copy-css.com/snippets/floating-action-button.md",
  "html": "<button class=\"btn-fab\" aria-label=\"Create new\">\n  <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M12 5v14M5 12h14\"/></svg>\n</button>",
  "css": ".btn-fab {\n  position: fixed;\n  right: 24px;\n  bottom: 24px;\n  z-index: 10;\n  display: grid;\n  place-items: center;\n  width: 56px;\n  height: 56px;\n  padding: 0;\n  border: 0;\n  border-radius: 16px;\n  background: #7c3aed;\n  color: #fff;\n  box-shadow:\n    0 4px 8px -2px #4c1d9566,\n    0 10px 24px -6px #7c3aed99;\n  cursor: pointer;\n  transition: box-shadow 0.2s ease, background-color 0.2s ease;\n}\n\n.btn-fab svg {\n  width: 26px;\n  height: 26px;\n  fill: none;\n  stroke: currentColor;\n  stroke-width: 2.4;\n  stroke-linecap: round;\n  transition: transform 0.3s ease;\n}\n\n.btn-fab:hover {\n  background: #6d28d9;\n  box-shadow:\n    0 6px 12px -2px #4c1d9566,\n    0 16px 32px -8px #7c3aed99;\n}\n\n.btn-fab:hover svg {\n  transform: rotate(90deg);\n}\n\n.btn-fab:focus-visible {\n  outline: 3px solid #c4b5fd;\n  outline-offset: 3px;\n}",
  "features": [
    "transitions",
    "transforms",
    "box shadows",
    "CSS Grid",
    "keyboard focus styles"
  ],
  "customProperties": []
}
