Skip to content

ScrollArea

ScrollArea

jsx
import ScrollArea from 'intergalactic/scroll-area';
<ScrollArea />;
import ScrollArea from 'intergalactic/scroll-area';
<ScrollArea />;

ScrollAreaProps

& {...}
NameTypeDescription
shadowbooleanShadow display on container
orientation"horizontal" | "vertical"Scroll direction
containerLink to the dom element, which will be a container with overflow
innerLink to the dom element that will be stretched along with the content
onResizeCallback executed when container change size
onScroll(event: React.SyntheticEvent<>) => voidCalled every time user scrolls area
tabIndexnumber | nullTab index that is being bypassed to the scroll container.
topOffsetnumber
rightOffsetnumber
bottomOffsetnumber
leftOffsetnumber

ScrollArea.Container

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

jsx
import ScrollArea from 'intergalactic/scroll-area';
<ScrollArea.Container />;
import ScrollArea from 'intergalactic/scroll-area';
<ScrollArea.Container />;

ScrollArea.Bar

jsx
import ScrollArea from 'intergalactic/scroll-area';
<ScrollArea.Bar />;
import ScrollArea from 'intergalactic/scroll-area';
<ScrollArea.Bar />;

ScrollBarProps

& {...}
NameTypeDescription
orientation"horizontal" | "vertical"The direction of the scroll that can be calculated automatically
containerLink to the dom element, which will be a container with overflow

ScrollArea.Bar.Slider

Stylized div. It takes all properties of Box.

jsx
import ScrollArea from 'intergalactic/scroll-area';
<ScrollArea.Bar.Slider />;
import ScrollArea from 'intergalactic/scroll-area';
<ScrollArea.Bar.Slider />;

Released under the MIT License.

Released under the MIT License.