Scroll Area

@sushindustries/ui

The named inner scroll: thin bar, and the smooth scroller handed back - the pair everyone forgets separately.

4 min read
View as MarkdownEdit on GitHub

Props

PropTypeDefaultDoes
childrenReactNode-
maxHeight?string"20rem"CSS max-height; scrolling starts past it.

Notes

data-lenis-prevent is always set, not conditional on maxHeight or on whether the content actually overflows - a ScrollArea shorter than its content costs nothing extra by carrying the attribute unused.

maxHeight takes any CSS length, not just the scale's tokens - "50vh" and "320px" are both valid, since a scroll boundary is one of the few places a literal value is the point rather than the drift a token exists to prevent.