{"$schema":"https://ui.logic2b.com/schema/registry-item.json","name":"scroll-area","type":"registry:ui","description":"Augments native scroll functionality with custom, cross-browser styled scrollbars. Use to control overflow inside a fixed-size container.","dependencies":["radix-ui"],"registryDependencies":["utils"],"files":[{"path":"ui/scroll-area.tsx","type":"registry:ui","content":"\"use client\"\n\nimport * as React from \"react\"\nimport { ScrollArea as ScrollAreaPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction ScrollArea({\n  className,\n  children,\n  ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n  return (\n    <ScrollAreaPrimitive.Root\n      data-slot=\"scroll-area\"\n      className={cn(\"relative\", className)}\n      {...props}\n    >\n      <ScrollAreaPrimitive.Viewport\n        data-slot=\"scroll-area-viewport\"\n        tabIndex={0}\n        className=\"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1\"\n      >\n        {children}\n      </ScrollAreaPrimitive.Viewport>\n      <ScrollBar />\n      <ScrollAreaPrimitive.Corner />\n    </ScrollAreaPrimitive.Root>\n  )\n}\n\nfunction ScrollBar({\n  className,\n  orientation = \"vertical\",\n  ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n  return (\n    <ScrollAreaPrimitive.ScrollAreaScrollbar\n      data-slot=\"scroll-area-scrollbar\"\n      orientation={orientation}\n      className={cn(\n        \"flex touch-none p-px transition-colors select-none\",\n        orientation === \"vertical\" &&\n          \"h-full w-2.5 border-l border-l-transparent\",\n        orientation === \"horizontal\" &&\n          \"h-2.5 flex-col border-t border-t-transparent\",\n        className\n      )}\n      {...props}\n    >\n      <ScrollAreaPrimitive.ScrollAreaThumb\n        data-slot=\"scroll-area-thumb\"\n        className=\"bg-border relative flex-1 rounded-full\"\n      />\n    </ScrollAreaPrimitive.ScrollAreaScrollbar>\n  )\n}\n\nexport { ScrollArea, ScrollBar }\n"}],"categories":["layout"],"accessibility":{"support":"primitive","pattern":"scrollable region","primitive":"Radix Scroll Area","keyboard":[{"keys":["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown"],"action":"Scroll a focused scroll container with the keyboard."}],"aria":["Preserves the semantics of its children while providing custom visual scrollbars."],"consumer":["Make the viewport focusable and label it only when the region itself needs keyboard scrolling or landmark semantics."]},"api":{"source":"src/ui/scroll-area.tsx","exports":[{"name":"ScrollArea","kind":"component","propsType":"React.ComponentProps<typeof ScrollAreaPrimitive.Root>"},{"name":"ScrollBar","kind":"component","propsType":"React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>","props":[{"name":"orientation","type":"\"horizontal\" | \"vertical\"","required":false,"default":"\"vertical\""}]}]}}