{
  "id": "marching-ants-border",
  "name": "Marching Ants Border",
  "category": "effects",
  "tags": [
    "marching ants",
    "animated dashed border",
    "selection",
    "drop target",
    "gradient",
    "keyframes"
  ],
  "description": "An animated dashed border whose dashes crawl around the box like a selection marquee, for drop zones and crops.",
  "url": "https://copy-css.com/snippets/marching-ants-border",
  "markdown": "https://copy-css.com/snippets/marching-ants-border.md",
  "html": "<div class=\"ants-border\">Drop files here</div>",
  "css": ".ants-border {\n  --c: #2563eb;\n  display: grid;\n  place-items: center;\n  width: 240px;\n  height: 120px;\n  background:\n    linear-gradient(90deg, var(--c) 50%, transparent 0) repeat-x 0 0 / 14px 2px,\n    linear-gradient(90deg, var(--c) 50%, transparent 0) repeat-x 0 100% / 14px 2px,\n    linear-gradient(0deg, var(--c) 50%, transparent 0) repeat-y 0 0 / 2px 14px,\n    linear-gradient(0deg, var(--c) 50%, transparent 0) repeat-y 100% 0 / 2px 14px,\n    #eff6ff;\n  color: #1e40af;\n  font: 600 15px system-ui, sans-serif;\n  animation: ants-border-march 0.6s linear infinite;\n}\n\n@keyframes ants-border-march {\n  to {\n    background-position: 14px 0, -14px 100%, 0 -14px, 100% 14px, 0 0;\n  }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .ants-border {\n    animation: none;\n  }\n}",
  "features": [
    "keyframe animations",
    "linear gradients",
    "CSS Grid",
    "custom properties",
    "reduced-motion support"
  ],
  "customProperties": [
    {
      "name": "--c",
      "value": "#2563eb"
    }
  ]
}
