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. Combine it with scrollbarVisibility="always" for persistent tracks. 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.
Composition
Scrollable content
- <ScrollArea>
- scrollable content
Installation
The Control UI source installs this primitive 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-* · 3 knobsHow the cascade resolves--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