Skip to content

ScrollArea

ScrollArea

jsx
import { ScrollArea } from '@semcore/ui/base-components';
<ScrollArea />;

ScrollAreaProps

& {...}
NameTypeDescription
shadowboolean Shadow display on container
orientation"horizontal" | "vertical" Scroll direction
container Link to the dom element, which will be a container with overflow
inner Link to the dom element that will be stretched along with the content
onResize Callback executed when container change size
onScroll(event: React.SyntheticEvent<>) => void Called every time user scrolls area
tabIndexnumber | null Tab index that is being bypassed to the scroll container.
forcedAdvancedModebooleanDeprecated
observeParentSizeboolean Flag to enable resizing if the parent of ScrollArea is resized
disableAutofocusToContentboolean Flag to disable autoscroll to focused content.
topOffsetnumber Top offset for scroll positioning
rightOffsetnumber Right offset for scroll positioning
bottomOffsetnumber Bottom offset for scroll positioning
leftOffsetnumber Left offset for scroll positioning
shadowSizenumber | {horizontal: number; vertical: number } Size for shadows in px.
shadowTheme | {horizontalTop?: ; horizontalBottom?: ; verticalLeft?: ; verticalRight?: } Style for shadows (black or white).

ScrollArea.Container

This is a wrap over the content to calculate its size. It takes all properties of Box.

jsx
import { ScrollArea } from '@semcore/ui/base-components';
<ScrollArea.Container />;

ScrollArea.Bar

jsx
import { ScrollArea } from '@semcore/ui/base-components';
<ScrollArea.Bar />;

ScrollBarProps

& {...}
NameTypeDescription
orientation"horizontal" | "vertical" The direction of the scroll that can be calculated automatically
containerReact.RefObject<> Reference to the scrollable container element

ScrollArea.Bar.Slider

Stylized div. It takes all properties of Box.

jsx
import { ScrollArea } from '@semcore/ui/base-components';
<ScrollArea.Bar.Slider />;

Released under the MIT License.

Released under the MIT License.