A scroll container with the same rounded scrollbar in every browser, Firefox included, and native scrolling.
Installation
Add it with the shadcn CLI, or copy the source by hand.
$ pnpm dlx shadcn@latest add @ssntl/scroll-areaAPI reference
ScrollArea
aria-label?Type:stringNames the scrolling region for keyboard and screen reader users.Default:—type?Type: —Default:"hover"
Also takes every prop of Radix ScrollArea.Root.
ScrollBar
orientation?Type: —Default:"vertical"
Also takes every prop of Radix ScrollArea.Scrollbar.
Rules
What this component expects from you, as it ships in components/ui/scroll-area.md next to the code. The full file adds when to use it, keyboard, the UI foundations it applies and every shared rule.
## Rules for Scroll area
- The same scrollbar everywhere, Firefox included: an 8px pill track with a 6px pill thumb nested 1px inside, so the curves are concentric.
- Scrolling stays native (wheel, touch, keyboard, find in page); only the bar is drawn.
- The viewport takes focus with a visible ring; give it an `aria-label` so the region has a name.
- `type="hover"` shows the bar while hovering or scrolling; use "always" when people must see there is more.
- Thumb on track is `--input` on `--muted`, 3:1 or more in both themes, checked in lint.