{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "chromatic-hover",
  "type": "registry:component",
  "title": "Chromatic Hover",
  "description": "Chromatic aberration that jitters on hover. Works on images, text, anything.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "hover",
    "hover",
    "rgb",
    "aberration",
    "image"
  ],
  "docs": "https://hyperblur.dev/effects/chromatic-hover",
  "files": [
    {
      "path": "registry/hyperblur/chromatic-hover.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/chromatic-hover.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ChromaticHoverProps extends React.HTMLAttributes<HTMLDivElement> {\n  children: React.ReactNode;\n  strength?: number;\n  always?: boolean;\n}\n\nconst css = `\n@keyframes hb-ch-jitter {\n  0%, 100% { filter: drop-shadow(calc(var(--hb-s) * -1) 0 0 rgba(25,195,245,.85)) drop-shadow(var(--hb-s) 0 0 rgba(255,47,160,.85)); }\n  33% { filter: drop-shadow(calc(var(--hb-s) * -1.6) 1px 0 rgba(25,195,245,.85)) drop-shadow(calc(var(--hb-s) * .6) -1px 0 rgba(255,47,160,.85)); }\n  66% { filter: drop-shadow(calc(var(--hb-s) * -.4) -1px 0 rgba(25,195,245,.85)) drop-shadow(calc(var(--hb-s) * 1.4) 1px 0 rgba(255,47,160,.85)); }\n}\n.hb-ch { display: inline-block; transition: filter .15s ease; }\n.hb-ch:hover, .hb-ch[data-always=\"true\"] { animation: hb-ch-jitter .5s steps(3) infinite; }\n@media (prefers-reduced-motion: reduce) { .hb-ch { animation: none !important; } }\n`;\n\nexport function ChromaticHover({\n  children,\n  strength = 3,\n  always = false,\n  className = \"\",\n  style,\n  ...rest\n}: ChromaticHoverProps) {\n  const vars = { \"--hb-s\": `${strength}px`, ...style } as React.CSSProperties;\n\n  return (\n    <div className={`hb-ch ${className}`} style={vars} data-always={always} {...rest}>\n      <style href=\"hb-chromatic-hover\" precedence=\"default\">{css}</style>\n      {children}\n    </div>\n  );\n}\n"
    }
  ]
}