ScrollFrame
A scrolling region that shows where there is more: each edge fades only while content runs on past it, and optional buttons step through it. Adapted from
Usage
Best practices
Reach for
ScrollFramewhenever a strip or a panel can overflow - a row of filters, a list in a fixed-height card. PlainScrollAreagives no sign that anything is hidden.Give a vertical frame a bounded height (
className="h-80"); a horizontal one needs only a bounded width, which a flex child withmin-w-0already has.Match
fadeThemeto the surface behind the frame (cardinside a Card). Over an image or a blur, usefadeMode="mask"instead.For a horizontal strip used with a mouse, add
dragScrollandcontrols; both stand aside on touch screens, and each control hides at the end it points to.
Props
Also exports
- type
ScrollFrameFadeMode - type
ScrollFrameFades - interface
ScrollFrameProps
Composition
Builds on
Used by