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.
Usage
import { ScrollArea, ScrollBar } from '@oceanic-hub/brand-system'Composition
Use the following composition to build a ScrollArea:
ScrollArea
└── ScrollBarA 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.
API Reference
See the ScrollArea API page for every prop of every part, with types, defaults and the contract that pins them.