4.2.0
Core

ScrollArea

A styled scrollbar around overflowing content — the appearance only, never a scroll implementation of its own.

Default

A styled scrollbar, not a custom scroll implementation — the keyboard still works.

0.8.0

0.8.1

0.8.2

0.8.3

0.8.4

0.8.5

0.8.6

0.8.7

0.7.0

0.7.1

0.7.2

0.7.3

0.7.4

0.7.5

0.7.6

0.7.7

0.6.0

0.6.1

0.6.2

0.6.3

0.6.4

0.6.5

0.6.6

0.6.7

Usage

import { ScrollArea, ScrollBar } from '@oceanic-hub/brand-system'

Composition

Use the following composition to build a ScrollArea:

ScrollArea
└── ScrollBar

A styled scrollbar, not a custom scroll implementation: keyboard scrolling, wheel momentum and focus scrolling all still behave natively. Wrap a Table in it for the styled scrollbar — the table already brings its own overflow container, so this adds the bar, not the scrolling.

ScrollArea renders its own vertical ScrollBar internally, so the common case needs nothing else. ScrollBar is exported anyway for the one thing that internal default cannot do — a horizontal bar — so reach for it explicitly, as its own child, when the content overflows sideways. Do not add a second vertical <ScrollBar />: the area already renders one, and a caller adding another gets two bars stacked on the same edge.

RTL is not supported — recorded in pairings.json under direction: nothing in this package has ever been laid out or measured right-to-left, and upstream ships an RTL example. Radix's ScrollArea does consume a dir prop (it flips which edge the vertical bar sits against), which is exactly why this refusal is stated rather than assumed: the prop type-checks today, and passing it would advertise a layout nobody has verified.

Horizontal scrolling

ScrollBar is exported for the one thing the internal vertical bar cannot do — render one explicitly with orientation="horizontal" when the content overflows sideways rather than down.

v0.8.0
v0.7.4
v0.7.3
v0.7.2
v0.7.1
v0.7.0
v0.6.5
v0.6.4
v0.6.3

API Reference

See the ScrollArea API page for every prop of every part, with types, defaults and the contract that pins them.

On this page