Basel Standard

Basel Standard / Docs

Scroll Area

Bounded overflow container with system-aligned scrollbars for long lists, feeds, and wide data strips.

Issue 01: Structured Product
Issue 02: Archive Systems
Issue 03: Dense Interfaces
Issue 04: Editorial Commerce
Issue 05: Data Surfaces
Issue 06: Guided Navigation
Issue 07: Operational Clarity
Issue 08: Review States
Issue 09: Launch Readiness
Issue 10: Release Notes
Issue 11: Catalog Rhythm
Issue 12: Post-Publish Audit

Scroll areas keep a surface bounded while still allowing longer content to remain accessible. The Swiss wrapper preserves the Radix viewport model and adds quieter system scrollbars that sit comfortably inside cards, drawers, and dense operational panels.

Installation

Install
Purchase access, then open /account/install to issue a registry token.

Usage

import { ScrollArea } from "@/components/ui/scroll-area"
<ScrollArea className="h-72 w-full border border-border">
  <div className="grid gap-2 p-4">{/* long content */}</div>
</ScrollArea>

Why This Primitive Exists

Not every long list should stretch the whole page. Scroll areas help when a container should keep its assigned size while the content inside it keeps growing.

  • Use them for feeds, navigation lists, inspectors, and wide metadata strips.
  • Prefer them when the surrounding layout should remain stable.
  • Avoid them when full-page document flow is clearer than a nested scrolling region.

Examples

Vertical Overflow

The most common pattern is a bounded list with enough height to preview the content before scrolling.

Issue 01: Structured Product
Issue 02: Archive Systems
Issue 03: Dense Interfaces
Issue 04: Editorial Commerce
Issue 05: Data Surfaces
Issue 06: Guided Navigation
Issue 07: Operational Clarity
Issue 08: Review States
Issue 09: Launch Readiness
Issue 10: Release Notes
Issue 11: Catalog Rhythm
Issue 12: Post-Publish Audit
<ScrollArea className="h-72 border border-border">
  <div className="grid gap-2 p-4">{items}</div>
</ScrollArea>

Horizontal Overflow

Use horizontal scrolling when a row of structured values needs to stay intact instead of wrapping into a harder-to-parse stack.

Collection
Foundations
State
Scheduled
Owner
Editorial
Market
North America
Revenue
$148,000
Window
April 04
<ScrollArea className="whitespace-nowrap border border-border">
  <div className="flex min-w-max">{columns}</div>
</ScrollArea>

In Context

Scroll areas work well inside cards and side panels where the shell should stay fixed while the feed or log continues below the fold.

Activity feed

Scroll areas preserve a bounded layout when the content stream is longer than the surface.

The surrounding card stays fixed while the feed remains readable and keyboard-scrollable inside it.

09:12
Release note approved and queued for subscriber delivery.
09:24
Finance attached the current pricing export for audit.
09:47
Editorial replaced the lead image with the licensed final asset.
10:02
Archive order switched from preview to curated mode.
10:18
Public teaser copy updated to match the launch brief.
10:41
Publishing checklist reached final confirmation state.
11:05
Issue visibility moved to scheduled for the April release window.

Guidance

Use Bounded Scrolling Deliberately

  • Add a scroll area when the parent layout needs a fixed footprint.
  • Avoid nested scrolling inside nested scrolling unless the workflow clearly demands it.
  • If the content is the page's primary reading surface, let the page scroll instead.

Set A Real Height Or Width

  • Give the container an explicit height for vertical overflow or a width constraint for horizontal overflow.
  • Without a constrained dimension, there is nothing meaningful for the scroll area to manage.
  • Keep the viewport size consistent with the surrounding card or panel rhythm.

Keep Content Structured

  • Use row dividers, timestamps, or headings so long lists remain scannable while scrolling.
  • Prefer one continuous list per scroll area rather than mixing unrelated modules inside the same viewport.
  • Add a horizontal ScrollBar explicitly when the content should scroll sideways.

API Reference

Exports

ExportRendersNotes
ScrollAreaScrollAreaPrimitive.Root with ViewportRoot wrapper that automatically includes the default scrollbar and corner.
ScrollBarScrollAreaPrimitive.ScrollAreaScrollbarReusable scrollbar for vertical or horizontal overflow.
ScrollAreaCornerScrollAreaPrimitive.CornerCorner element for two-axis scrolling layouts.

Notable Props

ExportPropTypeNotes
ScrollAreaclassNamestringUsually where you define the bounded height or width.
ScrollAreaother root propsRadix root propsForwarded to the underlying scroll area root.
ScrollBarorientation"vertical" | "horizontal"Defaults to "vertical".
ScrollBarclassNamestringExtends the scrollbar styling.

Built-In Behavior

AreaDetail
ViewportAlways rendered inside ScrollArea, so children become the scrollable content automatically.
Default scrollbarA vertical scrollbar is included by default.
Horizontal overflowAdd <ScrollBar orientation="horizontal" /> when content should also scroll sideways.
CornerUses the shared panel background so the lower-right corner stays visually resolved.

The wrapper stays close to Radix Scroll Area, so upstream accessibility and pointer behavior remain intact.