MCPcopy Create free account
hub / github.com/bernaferrari/FigmaToCode / ScrollArea

Function ScrollArea

packages/plugin-ui/src/components/ui/scroll-area.tsx:5–26  ·  view source on GitHub ↗
({
  className,
  children,
  ...props
}: ScrollAreaPrimitive.Root.Props)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected