npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-scroll-area.json --yesScroll area
ProA region of content that scrolls behind thin bars that float over its edge, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
import { Card } from '@/components/ui/goop/card';
import { ScrollArea } from '@/components/ui/goop/scroll-area';
const TEAM = ['Teodora Valk', 'Bilal Rashed', 'Ngozi Ilori', 'Yuto Sakamaki', 'Dagny Holm', 'Cormac Foley'];
function TeamPanel() {
return (
<Card variant="outline" className="h-50 p-0">
<ScrollArea fade aria-label="Team" className="h-full">
<ul className="flex flex-col p-1">
{TEAM.map((name) => (
<li key={name} className="flex h-7 items-center px-2 text-base leading-4 font-medium">
{name}
</li>
))}
</ul>
</ScrollArea>
</Card>
);
}Scroll the team with the wheel, the thumb or the keys after Tab; switch the bars to stay shown. The team is our own sample list.
When to use
- A region of content that scrolls behind thin bars that float over its edge.
When not to use
- For a whole page leave the browser's own scrolling.
Installation
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Scroll area on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-scroll-area.json --yesAdd the Goop Scroll area to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { Card } from '@/components/ui/goop/card';
import { ScrollArea } from '@/components/ui/goop/scroll-area';
const TEAM = ['Teodora Valk', 'Bilal Rashed', 'Ngozi Ilori', 'Yuto Sakamaki', 'Dagny Holm', 'Cormac Foley'];
function TeamPanel() {
return (
<Card variant="outline" className="h-50 p-0">
<ScrollArea fade aria-label="Team" className="h-full">
<ul className="flex flex-col p-1">
{TEAM.map((name) => (
<li key={name} className="flex h-7 items-center px-2 text-base leading-4 font-medium">
{name}
</li>
))}
</ul>
</ScrollArea>
</Card>
);
}- Fits: inbox, chat: aside.
- Also known as: ScrollView, ScrollContainer, CustomScrollbar, Scrollable.
- height, width, padding, corner, background, motion: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| orientation? | 'vertical' | 'horizontal' | 'both' = 'vertical' | The ways it scrolls: vertical, horizontal or both. |
| type? | 'auto' | 'always' = 'auto' | auto: the bars show while hovered or scrolling; always: they stay. |
| fade? | boolean = false | Fade the content out at each edge that hides more of it. |
| aria-label? | string | The region's name, set on the viewport that scrolls. |
| aria-labelledby? | string | The id of the element naming the region, set on the viewport. |
| viewportRef? | ComponentProps<'div'>['ref'] | The element that scrolls, to read or set its position. |
| children? | ReactNode |
- data-slot values (to select a part by): scroll-area, scroll-area-corner, scroll-area-scrollbar, scroll-area-thumb, scroll-area-viewport
Keyboard
| Key | What it does |
|---|---|
| Tab | Move to the region when its content overflows, then on |
| ArrowUp ArrowDown | Scroll the content a line |
| ArrowLeft ArrowRight | Scroll a region that scrolls across a step sideways |
| PageUp PageDown Space | Scroll the content a page |
| Home End | Scroll to the content's start or end |
Accessibility
- The behaviour layer under the part answers keys, focus and dismissal: never write your own.
- hover, focus-visible: the browser's own (:hover, :focus-visible): write nothing
Motion
- The part sets its own motion: add no transition or animation of your own.
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.