Skip to content

Scroll area

A scroll container with styled scrollbars on Base UI ScrollArea.

Vertical

Horizontal

Installation

npx shadcn@latest add @khaeli/scroll-area

Install @khaeli/foundation first: this item's styling lives in its tokens and [data-slot] rules.

Installs with

Registry items
npm packages
  • @base-ui/react ^1.7.0

Keyboard

Tab
Moves focus to the viewport when its content overflows.
Arrow keysPage UpPage DownHomeEnd
Scroll the focused viewport, as in any scrolling region.

Accessible name

  • The viewport has no role and no name. Name what is inside it instead, for example an aria-label on the list.
  • For sideways scrolling add <ScrollBar orientation="horizontal" /> after the content.

Registry JSON

The item as the shadcn CLI reads it, with every file it ships: https://ui.khaeli.com/r/scroll-area.json