Scroll Area
Custom styled, cross-browser scrollable area using native functionality.
Basic Example
ExpandCollapse
Control the scrollable axes
Use the scrollbars prop to limit scrollable axes. This prop can take values "vertical" | "horizontal" | "both".
ExpandCollapse
Setting the type of the Scrollbars
The type prop describes the nature of scrollbar visibility.
auto means that scrollbars are visible when content is overflowing on the corresponding orientation.
always means that scrollbars are always visible regardless of whether the content is overflowing.
scroll means that scrollbars are visible when the user is scrolling along its corresponding orientation.
hover when the user is scrolling along its corresponding orientation and when the user is hovering over the scroll area.
ExpandCollapse
API Reference
rx.scroll_area
Custom styled, cross-browser scrollable area using native functionality.
Props
| Prop | Type | Description |
|---|---|---|
scrollbars | "vertical""horizontal""both" | The alignment of the scroll area. |
type | "auto""always""scroll""hover" | Describes the nature of scrollbar visibility, similar to how the scrollbar preferences in MacOS control visibility of native scrollbars. "auto" | "always" | "scroll" | "hover". |
scroll_hide_delay | int | If type is set to either "scroll" or "hover", this prop determines the length of time, in milliseconds, before the scrollbars are hidden after the user stops interacting with scrollbars. |