{
  "id": "animated-border-card",
  "name": "Animated Border Card",
  "category": "cards",
  "tags": [
    "border",
    "animated",
    "conic",
    "rotate",
    "gradient",
    "dark"
  ],
  "description": "A dark card with a gradient border that keeps rotating around its edge.",
  "url": "https://copy-css.com/snippets/animated-border-card",
  "markdown": "https://copy-css.com/snippets/animated-border-card.md",
  "html": "<div class=\"border-spin\">\n  <h3>Realtime sync</h3>\n  <p>Every change shows up everywhere, instantly.</p>\n</div>",
  "css": ".border-spin {\n  position: relative;\n  isolation: isolate;\n  overflow: hidden;\n  width: 220px;\n  padding: 22px;\n  border-radius: 16px;\n  color: #cbd5e1;\n  font: 14px/1.5 system-ui, sans-serif;\n}\n\n/* A spinning gradient, larger than the card */\n.border-spin::before {\n  content: \"\";\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  z-index: -2;\n  width: 200%;\n  aspect-ratio: 1;\n  background: conic-gradient(#22d3ee, #a855f7, #f43f5e, #22d3ee);\n  translate: -50% -50%;\n  animation: border-spin 4s linear infinite;\n}\n\n/* The inner panel covers all but a 2px edge */\n.border-spin::after {\n  content: \"\";\n  position: absolute;\n  inset: 2px;\n  z-index: -1;\n  border-radius: 14px;\n  background: #0f172a;\n}\n\n.border-spin h3 {\n  margin: 0 0 6px;\n  color: #f8fafc;\n  font-size: 17px;\n}\n\n.border-spin p {\n  margin: 0;\n}\n\n@keyframes border-spin {\n  to { rotate: 1turn; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .border-spin::before { animation: none; }\n}",
  "features": [
    "keyframe animations",
    "conic gradients",
    "aspect-ratio",
    "reduced-motion support"
  ],
  "customProperties": []
}
