{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "shimmer",
  "type": "registry:ui",
  "title": "Shimmer",
  "description": "A readable text sweep for observable work.",
  "dependencies": [],
  "registryDependencies": [
    "https://ghost-ui.com/r/ghost-tokens.json",
    "https://ghost-ui.com/r/foundation.json"
  ],
  "files": [
    {
      "path": "src/components/ui/shimmer.tsx",
      "type": "registry:component",
      "target": "@ui/shimmer.tsx",
      "content": "import \"./foundation.css\";\nimport * as React from \"react\";\nimport \"./shimmer.css\";\n\nexport interface ShimmerProps extends React.ComponentPropsWithoutRef<\"span\"> {\n  active?: boolean;\n  variant?: \"default\" | \"gradient\";\n  duration?: string;\n  /** Tilt of the highlight band in degrees. Defaults to 100. */\n  angle?: number;\n}\nexport const Shimmer = React.forwardRef<HTMLSpanElement, ShimmerProps>(\n  function Shimmer(\n    {\n      active = true,\n      variant = \"default\",\n      duration,\n      angle,\n      style,\n      className,\n      ...props\n    },\n    ref,\n  ) {\n    return (\n      <span\n        {...props}\n        ref={ref}\n        className={[\"ui-shimmer\", className].filter(Boolean).join(\" \")}\n        data-active={active ? \"true\" : \"false\"}\n        data-variant={variant}\n        style={{\n          ...style,\n          ...(duration\n            ? ({ \"--shimmer-duration\": duration } as React.CSSProperties)\n            : {}),\n          ...(typeof angle === \"number\" && Number.isFinite(angle)\n            ? ({ \"--shimmer-angle\": `${angle}deg` } as React.CSSProperties)\n            : {}),\n        }}\n      />\n    );\n  },\n);\n"
    },
    {
      "path": "src/components/ui/shimmer.css",
      "type": "registry:file",
      "target": "@ui/shimmer.css",
      "content": ".ui-shimmer { color: inherit; }\n/* Tint and sweep width stay caller-owned; the sweep keeps a seamless loop. */\n.ui-shimmer[data-active=\"true\"] {\n  --shimmer-base: var(--muted-foreground);\n  --shimmer-highlight: color-mix(in oklab, var(--muted-foreground) 20%, var(--background));\n  --shimmer-spread: 10%;\n  --shimmer-angle: 100deg;\n  color: var(--shimmer-base);\n}\n@supports ((background-clip: text) or (-webkit-background-clip: text)) {\n  .ui-shimmer[data-active=\"true\"] {\n    color: transparent;\n    -webkit-text-fill-color: transparent;\n    background-image: var(--shimmer-image, linear-gradient(var(--shimmer-angle), var(--shimmer-base) calc(50% - var(--shimmer-spread)), var(--shimmer-highlight) 50%, var(--shimmer-base) calc(50% + var(--shimmer-spread))));\n    background-size: 200% 100%;\n    background-clip: text;\n    -webkit-background-clip: text;\n    animation: ui-shimmer-sweep var(--shimmer-duration, 2.4s) linear infinite;\n  }\n  .ui-shimmer[data-active=\"true\"][data-variant=\"gradient\"] {\n    --shimmer-image: linear-gradient(var(--shimmer-angle), var(--color-indigo-500, oklch(58.5% 0.233 277.117)), var(--color-violet-500, oklch(60.6% 0.25 292.717)), var(--color-purple-500, oklch(62.7% 0.265 303.9)), var(--color-fuchsia-500, oklch(66.7% 0.295 322.15)));\n  }\n}\n@keyframes ui-shimmer-sweep { from { background-position: 100% 0; } to { background-position: -100% 0; } }\n@media (prefers-reduced-motion: reduce), (forced-colors: active) { .ui-shimmer[data-active=\"true\"] { color: currentColor; -webkit-text-fill-color: currentColor; background: none; animation: none; } }\n"
    }
  ]
}
