MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / ScrollArea

Function ScrollArea

apps/ui/src/components/ui/scroll-area.tsx:9–30  ·  view source on GitHub ↗
({
  className,
  children,
  ...props
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>)

Source from the content-addressed store, hash-verified

7import { cn } from "@/lib/classnames";
8
9function ScrollArea({
10 className,
11 children,
12 ...props
13}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
14 return (
15 <ScrollAreaPrimitive.Root
16 data-slot='scroll-area'
17 className={cn("relative", className)}
18 {...props}
19 >
20 <ScrollAreaPrimitive.Viewport
21 data-slot='scroll-area-viewport'
22 className='focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1'
23 >
24 {children}
25 </ScrollAreaPrimitive.Viewport>
26 <ScrollBar />
27 <ScrollAreaPrimitive.Corner />
28 </ScrollAreaPrimitive.Root>
29 );
30}
31
32function ScrollBar({
33 className,

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected