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-example

Scroll Area

draco-china-github/scroll-area-example
FreeExample

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-example.json

Source

registry/radix-sera/examples/scroll-area-example.tsxraw.githubusercontent.com/draco-china/shadcn-pro/main/apps/docs/public/r/styles/radix-sera/scroll-area-example.json
1import * as React from "react"
2import Image from "next/image"
3
4import {
5 Example,
6 ExampleWrapper,
7} from "@/registry/radix-sera/components/example"
8import { ScrollArea, ScrollBar } from "@/registry/radix-sera/ui/scroll-area"
9import { Separator } from "@/registry/radix-sera/ui/separator"
10
11const tags = Array.from({ length: 50 }).map(
12 (_, i, a) => `v1.2.0-beta.${a.length - i}`
13)
14
15const works = [
16 {
17 artist: "Ornella Binni",
18 art: "https://images.unsplash.com/photo-1465869185982-5a1a7522cbcb?auto=format&fit=crop&w=300&q=80",
19 },
20 {
21 artist: "Tom Byrom",
22 art: "https://images.unsplash.com/photo-1548516173-3cabfa4607e9?auto=format&fit=crop&w=300&q=80",
23 },
24 {
25 artist: "Vladimir Malyav",
26 art: "https://images.unsplash.com/photo-1494337480532-3725c85fd2ab?auto=format&fit=crop&w=300&q=80",
27 },
28] as const
29
30export default function ScrollAreaExample() {
31 return (
32 <ExampleWrapper>
33 <ScrollAreaVertical />
34 <ScrollAreaHorizontal />
35 </ExampleWrapper>
36 )
37}
38
39function ScrollAreaVertical() {
40 return (
41 <Example title="Vertical">
42 <ScrollArea className="mx-auto h-72 w-48 overflow-hidden rounded-md border style-lyra:rounded-none style-maia:rounded-2xl style-luma:rounded-2xl style-sera:rounded-none">
43 <div className="p-4">
44 <h4 className="mb-4 text-sm leading-none font-medium">Tags</h4>
45 {tags.map((tag) => (
46 <React.Fragment key={tag}>
47 <div className="text-sm">{tag}</div>
48 <Separator className="my-2" />
49 </React.Fragment>
50 ))}
51 </div>
52 </ScrollArea>
53 </Example>
54 )
55}
56
57function ScrollAreaHorizontal() {
58 return (
59 <Example title="Horizontal">
60 <ScrollArea className="mx-auto w-full max-w-96 overflow-hidden rounded-md border p-4 **:data-[slot=scroll-area-viewport]:rounded-md style-lyra:rounded-none style-lyra:**:data-[slot=scroll-area-viewport]:rounded-none style-maia:rounded-2xl style-luma:rounded-2xl style-sera:rounded-none style-sera:**:data-[slot=scroll-area-viewport]:rounded-none">
61 <div className="flex gap-4">
62 {works.map((artwork) => (
63 <figure key={artwork.artist} className="shrink-0">
64 <div className="overflow-hidden rounded-md style-lyra:rounded-none style-sera:rounded-none">
65 <Image
66 src={artwork.art}
67 alt={`Photo by ${artwork.artist}`}
68 className="aspect-3/4 h-fit w-fit object-cover"
69// … truncated

What it pulls in

Other registry items

  • scroll-area
  • separator
  • example

Files it writes

  • registry/radix-sera/examples/scroll-area-example.tsx

Facts

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

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
Accordionaccordion-exampleshadcn/uiExamplesFreeno deps
Alert Dialogalert-dialog-exampleshadcn/uiExamplesFreeno deps
Alertalert-exampleshadcn/uiExamplesFreeno deps
Aspect Ratioaspect-ratio-exampleshadcn/uiExamplesFreeno deps
Avataravatar-exampleshadcn/uiExamplesFreeno deps
Badgebadge-exampleshadcn/uiExamplesFreeno deps
Breadcrumbbreadcrumb-exampleshadcn/uiExamplesFreeno deps
Buttonbutton-exampleshadcn/uiExamplesFreeno 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