{
  "format": "css.observer/playground@1",
  "id": "00000000-0000-4000-9000-000000000001",
  "url": "https://css.observer/s/gradient-border-button",
  "title": "Gradient border button",
  "description": "A hero call to action whose border is a rotating conic gradient, with a soft glow underneath.",
  "category": "buttons",
  "tags": [
    "property",
    "conic-gradient",
    "animation"
  ],
  "visibility": "public",
  "status": "published",
  "revision": 1,
  "author": "observer",
  "forked_from": null,
  "created_at": "2026-12-01T19:24:56.168Z",
  "updated_at": "2026-12-01T19:24:56.168Z",
  "published_at": "2026-12-01T19:24:56.168Z",
  "source": {
    "html": "<section class=\"hero\">\n  <p class=\"hero__badge\">Version 2.0 is out</p>\n  <h1 class=\"hero__title\">Ship interfaces faster</h1>\n  <p class=\"hero__text\">Components, tokens and docs in one place, ready for your next release.</p>\n  <div class=\"hero__actions\">\n    <a class=\"btn-ring\" href=\"#\">Get started <svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M5 12h14M13 6l6 6-6 6\"/></svg></a>\n    <a class=\"btn-quiet\" href=\"#\">Read the docs</a>\n  </div>\n</section>",
    "css": "@property --angle {\n  syntax: \"<angle>\";\n  inherits: false;\n  initial-value: 0deg;\n}\n\nbody {\n  margin: 0;\n  min-height: 100vh;\n  display: grid;\n  place-items: center;\n  background: radial-gradient(ellipse at top, #1b1d2a, #0a0b10 60%);\n  color: #f2f3f7;\n  font: 16px/1.5 system-ui, sans-serif;\n}\n\n.hero {\n  max-width: 34rem;\n  padding: 2rem;\n  text-align: center;\n}\n\n.hero__badge {\n  display: inline-block;\n  margin: 0;\n  padding: 0.3em 0.8em;\n  border: 1px solid rgb(255 255 255 / 0.12);\n  border-radius: 999px;\n  color: #b8bccb;\n  font-size: 0.8rem;\n}\n\n.hero__title {\n  margin: 0.8rem 0 0.5rem;\n  font-size: clamp(2rem, 6vw, 3.2rem);\n  line-height: 1.05;\n  letter-spacing: -0.035em;\n  text-wrap: balance;\n}\n\n.hero__text {\n  margin: 0 auto 1.8rem;\n  max-width: 28rem;\n  color: #9aa0b4;\n  text-wrap: pretty;\n}\n\n.hero__actions {\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: center;\n  gap: 0.75rem;\n}\n\n.btn-ring {\n  --ring: #7c6cff, #22d3ee, #a3e635, #f472b6, #7c6cff;\n\n  position: relative;\n  isolation: isolate;\n  display: inline-flex;\n  align-items: center;\n  gap: 0.5em;\n  padding: 0.8em 1.4em;\n  border: 1px solid transparent;\n  border-radius: 999px;\n  background:\n    linear-gradient(#12131a, #12131a) padding-box,\n    conic-gradient(from var(--angle), var(--ring)) border-box;\n  color: #fff;\n  font-weight: 600;\n  text-decoration: none;\n  animation: spin 4s linear infinite;\n}\n\n.btn-ring::before {\n  content: \"\";\n  position: absolute;\n  inset: -2px;\n  z-index: -1;\n  border-radius: inherit;\n  background: conic-gradient(from var(--angle), var(--ring));\n  filter: blur(16px);\n  opacity: 0.4;\n  animation: spin 4s linear infinite;\n  transition: opacity 0.3s;\n}\n\n.btn-ring svg {\n  transition: transform 0.2s;\n}\n\n.btn-ring:hover::before {\n  opacity: 0.75;\n}\n\n.btn-ring:hover svg {\n  transform: translateX(3px);\n}\n\n.btn-quiet {\n  display: inline-flex;\n  align-items: center;\n  padding: 0.8em 1.2em;\n  border-radius: 999px;\n  color: #c7cad6;\n  text-decoration: none;\n}\n\n.btn-quiet:hover {\n  background: rgb(255 255 255 / 0.06);\n  color: #fff;\n}\n\n:is(.btn-ring, .btn-quiet):focus-visible {\n  outline: 2px solid #fff;\n  outline-offset: 3px;\n}\n\n@keyframes spin {\n  to {\n    --angle: 360deg;\n  }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .btn-ring,\n  .btn-ring::before {\n    animation: none;\n  }\n}",
    "js": ""
  }
}