Scroll area

A React component in Beamline's Layout category.

A native scroll region with thin overlay thumbs and edge fades that show only where more content waits; thumbs can be dragged or clicked.

Use it for

  • Scrolling regions inside panels: logs, lists, side panels, horizontal rows.

Not for

  • The page itself (let the browser scroll).

Anatomy

  • root
  • viewport (native scroll)
  • edge fades (mask)
  • track
  • thumb

Variants

  • orientation: vertical, horizontal, both
  • scrollbars: auto, always

States

  • fits (no thumb, no fade)
  • at top
  • middle
  • at end
  • scrolling
  • dragging thumb
  • focus-visible (the look's focus ring on the root; the bar shows)

Keyboard

  • With a label the region is focusable: arrows, Page Up/Down, Home/End

Motion

The bar arrives at once when scrolling, pointed at or focused and fades over --pui-duration-considered after hideDelay; edge fades switch with the scroll position (no animation). Focus is never animated.

Props

PropTypeDefaultDescription
orientationstring"vertical"
fadenumber (px)24
scrollbars / hideDelay"auto" | "always" / number—
labelstring—
maxHeight / snap / wheelToHorizontalCSS / CSS / boolean—
onEdgeChange({ top, bottom, left, right }) => void—
viewportRef / viewportClassName / viewportStyleRef / string / CSSProperties—
style / refCSSProperties / native Ref—
classNamesScrollAreaClassNames—

Import

import { ScrollArea } from "@/components/scroll-area/scroll-area";

Get it

Scroll area is part of Beamline: 190 React components and screens your coding agent (Claude Code, Codex, Cursor or any MCP client) installs into your app through Beamline's MCP server, as a ready-built package or as plain React source you can change. $49 one payment (regular $200), no subscription, a year of updates, one licence for your whole team. Get Beamline · Connect your agent

More in Layout

  • Accordion: Topics that open in place, one at a time or several: FAQs and settings sections; each header is a button and the panel's height follows its content.
  • Aspect ratio: Holds media, video and embeds at a fixed width-to-height ratio while the layout resizes.
  • Bezel: A double-bezel frame: an outer shell with a hairline, a small gap, and an inset panel with its own edge, so a preview, chart or media reads as set into…
  • Card: A record or a small group of related content and actions: optional media, avatar, title, status, action, meta, free content and a Details toggle; plain…
  • Carousel: A row of slides that snap into place: swipe on touch, drag or the arrows with a mouse, ← → when focused, or the dots; optional autoplay that pauses and…
  • Collapsible: One region that opens and closes in place from its trigger, its height animating to the content.
  • Direction: Sets left-to-right or right-to-left for everything inside: text and logical spacing flip, and Radix parts read the direction for keys and placement.
  • Expandable card: A dense card that grows in place when asked: the frame resizes and the clamped preview opens into the full text.
  • Resizable panels: Panes that trade space across draggable dividers; each divider is a focusable separator with arrow keys, limits, folding for collapsible panes and…
  • Separator: A hairline between groups, horizontal or vertical; hidden from screen readers unless it carries meaning.
  • UI root: Makes a region of any app a Beamline root: theme, brand and direction for everything inside, and a matching layer at page level where its menus, dialogs…