Installation
$ pnpm dlx shadcn@latest add @synccn/scroll-areaFirst time in this project? Connect synccn with one command.
Usage
import { ScrollArea } from "@/components/ui/scroll-area";<ScrollArea className="h-64">…</ScrollArea>API reference
Generated from the component's TypeScript types, so it always matches the code.
ScrollArea
Scroll container with a slim scrollbar and edge fades that appear only when there's more to see.
PropTypeDescription
- orientation
"vertical" | "horizontal"Default
"vertical"Scroll direction.
- fade
booleanDefault
trueFade edges that have more content.
- className
stringExtra classes for the root element.
- children
React.ReactNodeContent to render.
Dependencies
Read from the component's imports when the site builds. The CLI installs all of these for you.
Helpers
- lib/utilscn (merges class names)
npm packages
- clsx for cn()
- tailwind-merge for cn()
Accessibility
From the source
Read from this component's code when the site builds, so it can't drift.
- ARIA roles: progressbar
- ARIA attributes: aria-label, aria-valuemax, aria-valuemin, aria-valuenow
- Shows a visible focus ring for keyboard users
More display
CardSurface with header, content and footer slots.BadgeSmall status label with an optional dot.AvatarImage with initials fallback, presence dot and stacked groups.KbdKeyboard key for shortcuts and hints.SeparatorHorizontal, vertical or labelled divider.AccordionExpanding sections with smooth height animation.