{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "scroll-area",
  "title": "Scroll Area",
  "description": "Thin custom scrollbars with edge fades.",
  "dependencies": [
    "radix-ui"
  ],
  "registryDependencies": [
    "utils",
    "https://ui.cuelark.com/r/theme.json"
  ],
  "files": [
    {
      "path": "src/registry/cuelark/ui/scroll-area.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { ScrollArea as ScrollAreaPrimitive } from \"radix-ui\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype ScrollAreaProps = React.ComponentProps<typeof ScrollAreaPrimitive.Root> & {\n  /** Fades content at the scrollable edges so it is obvious there is more. */\n  fade?: boolean;\n  orientation?: \"vertical\" | \"horizontal\" | \"both\";\n};\n\n/** Custom thin scrollbars that grow when hovered, over native scrolling (keyboard and touch keep working). */\nfunction ScrollArea({ className, children, fade = false, orientation = \"vertical\", ...props }: ScrollAreaProps) {\n  return (\n    <ScrollAreaPrimitive.Root data-slot=\"scroll-area\" className={cn(\"relative overflow-hidden\", className)} {...props}>\n      <ScrollAreaPrimitive.Viewport\n        data-slot=\"scroll-area-viewport\"\n        className={cn(\n          \"size-full rounded-[inherit] outline-none focus-visible:ring-3 focus-visible:ring-ring/50\",\n          fade && orientation !== \"horizontal\" && \"[mask-image:linear-gradient(to_bottom,transparent,black_24px,black_calc(100%-24px),transparent)]\",\n          fade && orientation === \"horizontal\" && \"[mask-image:linear-gradient(to_right,transparent,black_24px,black_calc(100%-24px),transparent)]\",\n        )}\n      >\n        {children}\n      </ScrollAreaPrimitive.Viewport>\n      {orientation !== \"horizontal\" && <ScrollBar orientation=\"vertical\" />}\n      {orientation !== \"vertical\" && <ScrollBar orientation=\"horizontal\" />}\n      <ScrollAreaPrimitive.Corner />\n    </ScrollAreaPrimitive.Root>\n  );\n}\n\nfunction ScrollBar({ className, orientation = \"vertical\", ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n  return (\n    <ScrollAreaPrimitive.ScrollAreaScrollbar\n      data-slot=\"scroll-area-scrollbar\"\n      orientation={orientation}\n      className={cn(\n        \"group/bar flex touch-none p-px transition-[width,height] duration-150 ease-cue select-none\",\n        orientation === \"vertical\" && \"h-full w-2 border-s border-s-transparent hover:w-2.5\",\n        orientation === \"horizontal\" && \"h-2 flex-col border-t border-t-transparent hover:h-2.5\",\n        className,\n      )}\n      {...props}\n    >\n      <ScrollAreaPrimitive.ScrollAreaThumb data-slot=\"scroll-area-thumb\" className=\"relative flex-1 rounded-full bg-foreground/20 transition-colors group-hover/bar:bg-foreground/35\" />\n    </ScrollAreaPrimitive.ScrollAreaScrollbar>\n  );\n}\n\nexport { ScrollArea, ScrollBar };\nexport type { ScrollAreaProps };\n",
      "type": "registry:ui"
    }
  ],
  "docs": "Docs and examples: https://ui.cuelark.com/components/scroll-area",
  "categories": [
    "display"
  ],
  "type": "registry:ui"
}