{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "loader-dna-helix",
  "type": "registry:component",
  "title": "Loader DNA Helix",
  "description": "A double helix of dots twists in sine motion, with depth shading and rungs that stretch between the strands.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "loaders",
    "loader",
    "helix",
    "dna",
    "science",
    "3d",
    "css"
  ],
  "docs": "https://hyperblur.dev/effects/loader-dna-helix",
  "files": [
    {
      "path": "registry/hyperblur/loader-dna-helix.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/loader-dna-helix.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface LoaderDnaHelixProps extends React.HTMLAttributes<HTMLSpanElement> {\n  size?: number;\n  color?: string;\n  accent?: string;\n  speed?: number;\n  rungs?: number;\n  label?: string;\n}\n\nconst css = `\n.hb-yb3 {\n  position: relative;\n  display: inline-flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 8px;\n  vertical-align: middle;\n  box-sizing: border-box;\n  font-family: inherit;\n}\n.hb-yb3 *, .hb-yb3 *::before, .hb-yb3 *::after { box-sizing: border-box; }\n.hb-yb3-h {\n  display: flex;\n  flex: none;\n  align-items: stretch;\n  gap: var(--hb-yb3-g);\n  height: var(--hb-yb3-s);\n}\n.hb-yb3-r {\n  position: relative;\n  width: var(--hb-yb3-p);\n  height: 100%;\n}\n.hb-yb3-r i,\n.hb-yb3-r u {\n  position: absolute;\n  left: 0;\n  top: calc(50% - var(--hb-yb3-p) / 2);\n  display: block;\n  width: var(--hb-yb3-p);\n  height: var(--hb-yb3-p);\n  animation: hb-yb3-y var(--hb-yb3-d) linear infinite;\n  animation-delay: calc(var(--hb-yb3-i) * var(--hb-yb3-d) * -0.1);\n}\n.hb-yb3-r u {\n  text-decoration: none;\n  animation-delay: calc(var(--hb-yb3-i) * var(--hb-yb3-d) * -0.1 - var(--hb-yb3-d) / 2);\n}\n.hb-yb3-r i b,\n.hb-yb3-r u b {\n  display: block;\n  width: 100%;\n  height: 100%;\n  border-radius: 50%;\n  animation: hb-yb3-z var(--hb-yb3-d) infinite;\n  animation-delay: inherit;\n}\n.hb-yb3-r i b {\n  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.55), transparent 55%), var(--hb-yb3-c);\n}\n.hb-yb3-r u b {\n  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.55), transparent 55%), var(--hb-yb3-a);\n}\n.hb-yb3-r s {\n  position: absolute;\n  left: calc(50% - 1px);\n  top: calc(50% - var(--hb-yb3-m));\n  display: block;\n  width: 2px;\n  height: calc(var(--hb-yb3-m) * 2);\n  border-radius: 1px;\n  background: linear-gradient(var(--hb-yb3-c), var(--hb-yb3-a));\n  opacity: 0.35;\n  transform: scaleY(0);\n  animation: hb-yb3-bar calc(var(--hb-yb3-d) / 2) linear infinite;\n  animation-delay: calc(var(--hb-yb3-i) * var(--hb-yb3-d) * -0.1);\n}\n.hb-yb3-l {\n  font-size: 12px;\n  line-height: 1.2;\n  letter-spacing: 0.01em;\n  color: inherit;\n  opacity: 0.72;\n  white-space: nowrap;\n}\n.hb-yb3-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip-path: inset(50%);\n  white-space: nowrap;\n  border: 0;\n}\n@keyframes hb-yb3-y {\n  0% { transform: translateY(0); animation-timing-function: cubic-bezier(0.39, 0.575, 0.565, 1); }\n  25% { transform: translateY(var(--hb-yb3-m)); animation-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715); }\n  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0.39, 0.575, 0.565, 1); }\n  75% { transform: translateY(calc(var(--hb-yb3-m) * -1)); animation-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715); }\n  100% { transform: translateY(0); }\n}\n@keyframes hb-yb3-z {\n  0%, 100% { transform: scale(1); opacity: 1; animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1); }\n  50% { transform: scale(0.5); opacity: 0.5; animation-timing-function: cubic-bezier(0.37, 0, 0.63, 1); }\n}\n@keyframes hb-yb3-bar {\n  0% { transform: scaleY(0); animation-timing-function: cubic-bezier(0.39, 0.575, 0.565, 1); }\n  50% { transform: scaleY(1); animation-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715); }\n  100% { transform: scaleY(0); }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-yb3-r i, .hb-yb3-r u, .hb-yb3-r i b, .hb-yb3-r u b, .hb-yb3-r s { animation-play-state: paused; }\n}\n`;\n\nexport function LoaderDnaHelix({\n  size = 48,\n  color = \"#2f7bff\",\n  accent = \"#ff6b9a\",\n  speed = 2.4,\n  rungs = 10,\n  label,\n  className = \"\",\n  style,\n  ...rest\n}: LoaderDnaHelixProps) {\n  const n = Math.max(4, Math.min(20, Math.round(rungs)));\n  const dot = Math.max(3, size * 0.14);\n  const vars = {\n    \"--hb-yb3-s\": `${size}px`,\n    \"--hb-yb3-p\": `${dot.toFixed(2)}px`,\n    \"--hb-yb3-g\": `${(dot * 0.9).toFixed(2)}px`,\n    \"--hb-yb3-m\": `${((size - dot) / 2).toFixed(2)}px`,\n    \"--hb-yb3-d\": `${(speed > 0 ? speed : 2.4).toFixed(3)}s`,\n    \"--hb-yb3-c\": color,\n    \"--hb-yb3-a\": accent,\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <span role=\"status\" className={`hb-yb3 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-loader-dna-helix\" precedence=\"default\">{css}</style>\n      <span className=\"hb-yb3-h\" aria-hidden=\"true\">\n        {Array.from({ length: n }, (_, i) => {\n          const at = { \"--hb-yb3-i\": i } as React.CSSProperties;\n          return (\n            <span key={i} className=\"hb-yb3-r\" style={at}>\n              <s />\n              <i>\n                <b />\n              </i>\n              <u>\n                <b />\n              </u>\n            </span>\n          );\n        })}\n      </span>\n      <span className={label ? \"hb-yb3-l\" : \"hb-yb3-sr\"}>{label ?? \"Loading\"}</span>\n    </span>\n  );\n}\n"
    }
  ]
}