{
  "id": "clip-path-shapes",
  "name": "Clip Path Shapes",
  "category": "effects",
  "tags": [
    "clip-path",
    "hexagon",
    "circle",
    "polygon",
    "image shapes",
    "mask"
  ],
  "description": "Three ready-made clip-path classes that crop images into a circle, a hexagon and a slanted card.",
  "url": "https://copy-css.com/snippets/clip-path-shapes",
  "markdown": "https://copy-css.com/snippets/clip-path-shapes.md",
  "html": "<div class=\"clip-shapes\">\n  <img class=\"clip-circle\" src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Crect width='10' height='10' fill='%23f9a8d4'/%3E%3Ccircle cx='7' cy='3' r='1.6' fill='%23fef08a'/%3E%3Cpath d='M0 10V7l3-2 3 2 4-2v5z' fill='%237c3aed'/%3E%3C/svg%3E\" alt=\"Circle-cropped sunset\" width=\"80\" height=\"80\">\n  <img class=\"clip-hexagon\" src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Crect width='10' height='10' fill='%23f9a8d4'/%3E%3Ccircle cx='7' cy='3' r='1.6' fill='%23fef08a'/%3E%3Cpath d='M0 10V7l3-2 3 2 4-2v5z' fill='%237c3aed'/%3E%3C/svg%3E\" alt=\"Hexagon-cropped sunset\" width=\"80\" height=\"80\">\n  <img class=\"clip-slant\" src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Crect width='10' height='10' fill='%23f9a8d4'/%3E%3Ccircle cx='7' cy='3' r='1.6' fill='%23fef08a'/%3E%3Cpath d='M0 10V7l3-2 3 2 4-2v5z' fill='%237c3aed'/%3E%3C/svg%3E\" alt=\"Slant-cropped sunset\" width=\"80\" height=\"80\">\n</div>",
  "css": ".clip-shapes {\n  display: flex;\n  gap: 14px;\n}\n\n.clip-shapes img {\n  display: block;\n  width: 80px;\n  height: 80px;\n  object-fit: cover;\n  transition: clip-path 0.4s ease;\n}\n\n.clip-circle {\n  clip-path: circle(50%);\n}\n\n.clip-hexagon {\n  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);\n}\n\n.clip-slant {\n  clip-path: polygon(0 0, 100% 12%, 100% 100%, 0 88%);\n}\n\n.clip-shapes img:hover {\n  clip-path: inset(0 round 12px);\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .clip-shapes img {\n    transition: none;\n  }\n}",
  "features": [
    "transitions",
    "clip paths",
    "Flexbox",
    "reduced-motion support"
  ],
  "customProperties": []
}
