{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "progressive-blur",
  "title": "Progressive blur",
  "description": "Blur that grows stronger toward the edge of a scroll container, built from stacked backdrop-filter layers; shown on a scrolling bookings list.",
  "dependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/components/cards/progressive-blur.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\n\nexport type ProgressiveBlurProps = React.HTMLAttributes<HTMLDivElement> & {\n  /** Edge the blur sits on; it grows toward that edge. */\n  side?: \"top\" | \"bottom\" | \"left\" | \"right\"\n  /** Size of the blurred band (any CSS length). */\n  size?: string | number\n  /** Blur in px at the very edge. */\n  blur?: number\n  /** Number of stacked layers; more is smoother, fewer is cheaper. */\n  layers?: number\n  /** Also fade to this color at the edge (e.g. \"var(--card)\"). Off when undefined. */\n  fadeColor?: string\n}\n\nconst DIR = { top: \"to top\", bottom: \"to bottom\", left: \"to left\", right: \"to right\" } as const\n\n/**\n * A blur that gets stronger toward one edge, made of stacked backdrop-filter layers that each cover a slice of\n * the band. Place it inside a `relative` wrapper around a scroll container.\n */\nexport function ProgressiveBlur({\n  side = \"bottom\",\n  size = \"35%\",\n  blur = 8,\n  layers = 6,\n  fadeColor,\n  className,\n  style,\n  ...props\n}: ProgressiveBlurProps) {\n  const n = Math.max(2, Math.round(layers))\n  const dir = DIR[side]\n  const seg = 100 / (n + 1)\n  const vertical = side === \"top\" || side === \"bottom\"\n  const length = typeof size === \"number\" ? `${size}px` : size\n\n  const position: React.CSSProperties = vertical\n    ? { left: 0, right: 0, [side]: 0, height: length }\n    : { top: 0, bottom: 0, [side]: 0, width: length }\n\n  return (\n    <div aria-hidden=\"true\" className={cn(\"pointer-events-none absolute z-10\", className)} style={{ ...position, ...style }} {...props}>\n      {Array.from({ length: n }, (_, i) => {\n        // Blur doubles per layer up to `blur`; each layer is fully opaque over its own slice and fades at the ends.\n        const amount = blur / 2 ** (n - 1 - i)\n        const a = i * seg\n        const b = (i + 1) * seg\n        const c = (i + 2) * seg\n        const mask =\n          i === n - 1\n            ? `linear-gradient(${dir}, transparent ${a}%, #000 ${b}%, #000 100%)`\n            : `linear-gradient(${dir}, transparent ${a}%, #000 ${b}%, #000 ${c}%, transparent ${Math.min(100, (i + 3) * seg)}%)`\n        return (\n          <div\n            key={i}\n            className=\"absolute inset-0\"\n            style={{\n              backdropFilter: `blur(${amount.toFixed(2)}px)`,\n              WebkitBackdropFilter: `blur(${amount.toFixed(2)}px)`,\n              maskImage: mask,\n              WebkitMaskImage: mask,\n            }}\n          />\n        )\n      })}\n      {fadeColor && <div className=\"absolute inset-0\" style={{ background: `linear-gradient(${dir}, transparent 20%, ${fadeColor})` }} />}\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/goodui/progressive-blur.tsx"
    }
  ],
  "categories": [
    "components",
    "cards"
  ],
  "type": "registry:component"
}