ProductBrand
Join us
Foundations
  • Introduction
  • Colors
  • Typography
  • Icons
  • Illustrations
  • Logos
  • Shadows
Components
  • Accordion
  • Alert Dialog
  • Avatar
  • Badge
  • Button
  • Calendar
  • Card
  • Chart
  • Checkbox
  • Collapsible
  • Combobox
  • Context Menu
  • Date Picker
  • Dialog
  • Drawer
  • Dropdown Menu
  • Fluid Avatar
  • Hover Scroll Text
  • Input
  • Kbd
  • Popover
  • Progress Bar
  • Radio Group
  • Scroll Area
  • Select
  • Selectors
  • Separator
  • Separator Dot
  • Shimmer Text
  • Skeleton
  • Slider
  • Switch
  • Tabs
  • Textarea
  • Toast
  • Tooltip
Compositions
  • Empty State
  • File Attachment
  • Floating Bar
  • Input Banner
  • Markdown Editor
  • Media Controls
  • Product Feature Banner
  • Panels
  • Sidebar
  • Reasoning Trace
  • Pagination
  • Data Table
  • Breadcrumb
  • Thread Outline
Inline
  • Overview
  • Stat Tile
  • Metric Row
  • Comparison Table
  • Chart Card
  • Trend Tile
  • Cite
  • Custom
  • Agent skill

Scroll Area

Scrollable container for content that exceeds available space.

Examples

Q1 2023 Portfolio Review.pdf
Q2 2023 Portfolio Review.pdf
Q3 2023 Portfolio Review.pdf
Q4 2023 Portfolio Review.pdf
Q1 2024 Portfolio Review.pdf
Q2 2024 Portfolio Review.pdf
Q3 2024 Portfolio Review.pdf
Q4 2024 Portfolio Review.pdf

Overview

ScrollArea provides a customizable scrollable container with styled scrollbars. Fade effects at scroll boundaries hint at hidden content, and it supports both vertical and horizontal scrolling.

tsx
import {
  ScrollArea,
  ScrollAreaContent,
  ScrollAreaScrollbar,
  ScrollAreaThumb,
} from "@rogo-technologies/ui/scroll-area";

<ScrollArea>
  <ScrollAreaContent>{/* scrollable content */}</ScrollAreaContent>
  <ScrollAreaScrollbar>
    <ScrollAreaThumb />
  </ScrollAreaScrollbar>
</ScrollArea>;

Usage

Vertical

tsx
<div className="h-56 w-80">
  <ScrollArea className="h-full w-full">
    <ScrollAreaContent viewportClassName="h-full">{/* overflowing content */}</ScrollAreaContent>
    <ScrollAreaScrollbar>
      <ScrollAreaThumb />
    </ScrollAreaScrollbar>
  </ScrollArea>
</div>

Horizontal

Set orientation="horizontal" on the scrollbar; use shrink-0 on row items so they don't collapse.

tsx
<ScrollArea>
  <ScrollAreaContent className="flex gap-4">
    {items.map((item) => (
      <div key={item.id} className="shrink-0">
        {item.content}
      </div>
    ))}
  </ScrollAreaContent>
  <ScrollAreaScrollbar orientation="horizontal">
    <ScrollAreaThumb />
  </ScrollAreaScrollbar>
</ScrollArea>

Fade effect

The scroll area automatically masks content at scrollable edges, with no extra configuration needed.

API

Components

ComponentDescription
ScrollAreaRoot container that sets up the scroll context.
ScrollAreaContentWraps the scrollable content with a viewport.
ScrollAreaScrollbarThe scrollbar track (vertical by default).
ScrollAreaThumbThe draggable scrollbar handle.

ScrollArea

PropTypeDefaultDescription
classNamestring-Additional CSS classes.

ScrollAreaContent

PropTypeDefaultDescription
classNamestring-Classes for the content container.
viewportClassNamestring-Classes for the viewport wrapper.
viewportStyleCSSProperties-Inline styles for the viewport.

ScrollAreaScrollbar

PropTypeDefaultDescription
orientation"vertical" | "horizontal""vertical"Scroll direction.
classNamestring-Additional CSS classes.

ScrollAreaThumb

PropTypeDefaultDescription
classNamestring-Additional CSS classes.

Guidelines

Do

  • Set an explicit height/width on the ScrollArea container
  • Use shrink-0 on horizontal scroll items to prevent collapse
  • Use viewportClassName when the viewport itself needs styling

Don't

  • Don't nest scroll areas. It creates confusing UX
  • Don't forget ScrollAreaScrollbar. Without it scrolling is hidden from users
  • Don't use a ScrollArea for very short content that doesn't actually need scrolling
PreviousRadio Group
NextSelect
Made in NYC© 2026 Rogo Technologies Inc.

Design at Rogo

We’re redesigning an entire industry. Come design it with us.

See open roles

Design at Rogo

  • How we workThe mission of design at Rogo, and the open roles
  • About RogoThe company and the product