Scroll area
Scroll container with overlay or space-reserving scrollbars, edge fades, and optional progressive blur.
Examples
Stable scrollbar gutter
Set scrollbarGutter="stable" to reserve space for each unlocked scrollbar, even when the content fits; the reserved gutter stays empty until that axis overflows. Combine it with scrollbarVisibility="always" for persistent tracks on overflowing content. Both props override the skin defaults; Windows XP uses always-visible, space-reserving scrollbars.
Progressive blur
Enable blur to soften overflowing edges. Combine it with the default mask, or use mask={false} for blur alone. blurProps.style accepts the ProgressiveBlur knobs. Effects follow each unlocked edge without adding scroll listeners. Where non-round corner shapes are supported, those shapes take priority and disable scroll-edge blur; the mask remains available. Blur samples what is painted inside the nearest masked ancestor, so a scroll area nested in a masked one needs an opaque surface between them; PageLayout's inset viewport paints the page surface for that reason.
Composition
Scrollable content
- <ScrollArea>
- scrollable content
Installation
The Control UI source installs this component from src/registry/sources/control-ui/ui/scroll-area.tsx.
Dependencies
Raw code
Primary installed source
Knobs
Typed custom properties the recipe paints with. Set one on the root — style, a utility class, or a skin — and every slot inherits it.
--cui-scroll-area-* · 4 knobsHow the cascade resolves--cui-scroll-area-scrollbar-size<length-percentage>calc(var(--spacing) * 1.5)--cui-scroll-area-thumb-radius<length-percentage>9999px--cui-scroll-area-thumb-background<color>oklch(from var(--foreground) l c h / 0.4)--cui-scroll-area-corner-background<color>transparent