BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn/ui/scroll-area

scroll-area

draco-china-github/scroll-area
FreeComponent

shadcn/ui publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/draco-china/shadcn-pro/main/apps/docs/public/r/styles/radix-sera/scroll-area.json

Source

registry/radix-sera/ui/scroll-area.tsxraw.githubusercontent.com/draco-china/shadcn-pro/main/apps/docs/public/r/styles/radix-sera/scroll-area.json
1"use client"
2
3import * as React from "react"
4import { ScrollArea as ScrollAreaPrimitive } from "radix-ui"
5
6import { cn } from "@/registry/radix-sera/lib/utils"
7
8function ScrollArea({
9 className,
10 children,
11 ...props
12}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
13 return (
14 <ScrollAreaPrimitive.Root
15 data-slot="scroll-area"
16 className={cn("relative", className)}
17 {...props}
18 >
19 <ScrollAreaPrimitive.Viewport
20 data-slot="scroll-area-viewport"
21 className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
22 >
23 {children}
24 </ScrollAreaPrimitive.Viewport>
25 <ScrollBar />
26 <ScrollAreaPrimitive.Corner />
27 </ScrollAreaPrimitive.Root>
28 )
29}
30
31function ScrollBar({
32 className,
33 orientation = "vertical",
34 ...props
35}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
36 return (
37 <ScrollAreaPrimitive.ScrollAreaScrollbar
38 data-slot="scroll-area-scrollbar"
39 data-orientation={orientation}
40 orientation={orientation}
41 className={cn(
42 "flex touch-none p-px transition-colors select-none 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",
43 className
44 )}
45 {...props}
46 >
47 <ScrollAreaPrimitive.ScrollAreaThumb
48 data-slot="scroll-area-thumb"
49 className="relative flex-1 rounded-none bg-border"
50 />
51 </ScrollAreaPrimitive.ScrollAreaScrollbar>
52 )
53}
54
55export { ScrollArea, ScrollBar }

Files it writes

  • registry/radix-sera/ui/scroll-area.tsx

Facts

Registry
shadcn/ui
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-04
Last confirmed
today

Go to the source

draco-china.github.io draco-china/shadcn-pro on GitHub Raw registry item This item as JSON

More from shadcn/ui

All 201 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionshadcn/uiComponentsFreeno deps
alertalertshadcn/uiComponentsFreeno deps
alert-dialogalert-dialogshadcn/uiComponentsFreeno deps
aspect-ratioaspect-ratioshadcn/uiComponentsFreeno deps
avataravatarshadcn/uiComponentsFreeno deps
badgebadgeshadcn/uiComponentsFreeno deps
breadcrumbbreadcrumbshadcn/uiComponentsFreeno deps
buttonbuttonshadcn/uiComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex