scroll-area
agileflow-projectquestorg/scroll-areaFreeComponent
shadcn/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/projectquestorg/AgileFlow/main/apps/docs/public/r/styles/radix-nova/scroll-area.jsonSource
1"use client"23import * as React from "react"4import { ScrollArea as ScrollAreaPrimitive } from "radix-ui"56import { cn } from "@/registry/bases/radix/lib/utils"78function ScrollArea({9 className,10 children,11 ...props12}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {13 return (14 <ScrollAreaPrimitive.Root15 data-slot="scroll-area"16 className={cn("relative", className)}17 {...props}18 >19 <ScrollAreaPrimitive.Viewport20 data-slot="scroll-area-viewport"21 className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"22 >23 {children}24 </ScrollAreaPrimitive.Viewport>25 <ScrollBar />26 <ScrollAreaPrimitive.Corner />27 </ScrollAreaPrimitive.Root>28 )29}3031function ScrollBar({32 className,33 orientation = "vertical",34 ...props35}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {36 return (37 <ScrollAreaPrimitive.ScrollAreaScrollbar38 data-slot="scroll-area-scrollbar"39 data-orientation={orientation}40 orientation={orientation}41 className={cn(42 "data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none",43 className44 )}45 {...props}46 >47 <ScrollAreaPrimitive.ScrollAreaThumb48 data-slot="scroll-area-thumb"49 className="rounded-full bg-border relative flex-1"50 />51 </ScrollAreaPrimitive.ScrollAreaScrollbar>52 )53}5455export { ScrollArea, ScrollBar }
Files it writes
More from shadcn/ui
All 133 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn/ui | Components | Free | no deps | |
| alertalert | shadcn/ui | Components | Free | no deps | |
| alert-dialogalert-dialog | shadcn/ui | Components | Free | no deps | |
| aspect-ratioaspect-ratio | shadcn/ui | Components | Free | no deps | |
| avataravatar | shadcn/ui | Components | Free | no deps | |
| badgebadge | shadcn/ui | Components | Free | no deps | |
| breadcrumbbreadcrumb | shadcn/ui | Components | Free | no deps | |
| buttonbutton | shadcn/ui | Components | Free | no deps |
