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

Function ScrollBar

packages/plugin-ui/src/components/ui/scroll-area.tsx:28–50  ·  view source on GitHub ↗
({
  className,
  orientation = "vertical",
  ...props
}: ScrollAreaPrimitive.Scrollbar.Props)

Source from the content-addressed store, hash-verified

26}
27
28function ScrollBar({
29 className,
30 orientation = "vertical",
31 ...props
32}: ScrollAreaPrimitive.Scrollbar.Props) {
33 return (
34 <ScrollAreaPrimitive.Scrollbar
35 data-slot="scroll-area-scrollbar"
36 data-orientation={orientation}
37 orientation={orientation}
38 className={cn(
39 "flex touch-none p-px transition-colors select-none data-[orientation=horizontal]:h-2.5 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:border-t data-[orientation=horizontal]:border-t-transparent data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2.5 data-[orientation=vertical]:border-l data-[orientation=vertical]:border-l-transparent",
40 className,
41 )}
42 {...props}
43 >
44 <ScrollAreaPrimitive.Thumb
45 data-slot="scroll-area-thumb"
46 className="relative flex-1 rounded-full bg-muted-foreground/40"
47 />
48 </ScrollAreaPrimitive.Scrollbar>
49 );
50}
51
52export { ScrollArea, ScrollBar };

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected