Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-scroll-area.json --yes

Scroll area

Pro

A region of content that scrolls behind thin bars that float over its edge, for React and Tailwind CSS. Part of Goop Pro.

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.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-scroll-area.json --yes
PROMPT
Add the Goop Scroll area to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
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

Options
OptionTypeWhat 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 = falseFade the content out at each edge that hides more of it.
aria-label?stringThe region's name, set on the viewport that scrolls.
aria-labelledby?stringThe 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

KeyWhat it does
TabMove to the region when its content overflows, then on
ArrowUp ArrowDownScroll the content a line
ArrowLeft ArrowRightScroll a region that scrolls across a step sideways
PageUp PageDown SpaceScroll the content a page
Home EndScroll 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.

goop.so/themes/meadow/components/scroll-area.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-scroll-area.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.