2.0.4 • Published 1 week ago
@synerise/ds-scrollbar
Licence
ISC
Version
2.0.4
Deps
0
Vulns
0
Weekly
0
id: scrollbar title: Scrollbar
Scrollbar UI Component
Installation
npm i @synerise/ds-scrollbar
or
pnpm add @synerise/ds-scrollbar
Usage
import Scrollbar from '@synerise/ds-scrollbar'
<Scrollbar />
Demo
API
| Property | Description | Type | Default |
|---|---|---|---|
| absolute | Whether the scrollbar is over content | boolean | false |
| largeSize | Larger scrollbar | boolean | false |
| children | Scrolled component | React.ReactNode / string | - |
| classes | String with optional classes | string | - |
| fetchData | Callback called when scrollbar has been scrolled to the end in Y axis | () => void | - |
| hasMore | Whether the scrollbar can calls fetchData | boolean | - |
| loading | Whether the scrollbar shows loading icon | boolean | - |
| maxHeight | Optional max-height value | string / number | - |
| style | Additional styles for scrollbar wrapper | React.CSSProperties | - |
| withDnd | Whether use DndScrollbar or VirtualScrollbar component | boolean | false |
| onScroll | Callback fired on scroll events | (event: UIEvent) => void | - |
| onYReachEnd | Callback fired independently when scroll reaches the Y end | () => void | - |
| confineScroll | Will prevent wheel event from propagating (scrolling outer scope) if set to true | boolean | false |
| overscrollBehavior | CSS overscroll-behavior applied to the scroll container — honored by both the virtual and withDnd variants |
'auto' | 'contain' | 'none' |
'contain' |