importScrollbarsfrom'solid-custom-scrollbars'// later on..return(<Wrapper><Scrollbars><Content/></Scrollbars></Wrapper>)event handler for scroll events
onScroll: (event?: Event)=>anyruns inside the animation frame
// values about the current positioninterfaceIValues{left: number// scrollLeft progess, from 0 to 1top: number// scrollTop progess, from 0 to 1scrollLeft: number// Native scrollLeftscrollTop: number// Native scrollTopscrollWidth: number// Native scrollWidthscrollHeight: number// Native scrollHeightclientWidth: number// Width of the viewclientHeight: number// Height of the view}
onScroll: (values: IValues)=>anycalled when scrolling starts
onScrollStart: ()=>anycalled when scrolling stops
onScrollStop: ()=>anycalled when ever the component is updated. Runs inside the animation frame
onUpdate: (values: IValues)=>anythe element your content will be rendered in
renderView: Component<JSX.HTMLAttributes<HTMLDivElement>>the horizontal track element
renderTrackHorizontal: Component<RenderComponentProps>the vertical track element
renderTrackVertical: Component<RenderComponentProps>the horizontal thumb element
renderThumbHorizontal: Component<RenderComponentProps>the vertical thumb element
renderThumbVertical: Component<RenderComponentProps>set a fixed size for thumbs in px
thumbSize: numberminimal thumb size in px (default: 30)
thumbMinSize: numberhide tracks (visibility: hidden) when content does not overflow container (default: false)
hideTracksWhenNotNeeded: booleanenable auto-hide mode (default: false)
when set to true tracks will hide automatically and are only visible while scrolling
autoHide: booleanhide delay in ms (default: 1000)
autoHideTimeout: numberduration for hide animation in ms (default: 200)
autoHideDuration: numberenable auto-height mode (default: false)
when set to true the container grows with content
autoHeight: booleanSet a minimum height for auto-height mode (default: 0)
autoHeightMin: numberSet a maximum height for auto-height mode (default: 200)
autoHeightMax: numberEnable universal rendering (default: false)
learn how to use universal rendering
universal: booleanthe methods can be accessed through the functions object.
constApp: Component=()=>{letscrollbarRefonMount(()=>{scrollbarRef.functions.scrollTop()})return(<Scrollbarsref={scrollbarRef}></Scrollbars>)}scroll to the top value
scrollTop: (top=0)=>voidscroll to the left value
scrollLeft: (left=0)=>voidscroll to top
scrollToTop: ()=>voidscroll to bottom
scrollToBottom: ()=>voidscroll to left
scrollToLeft: ()=>voidscroll to right
scrollToRight: ()=>voidget scrollLeft value
getScrollLeft: ()=>numberget scrollTop value
getScrollTop: ()=>numberget scrollWidth value
getScrollWidth: ()=>numberget scrollHeight value
getScrollHeight: ()=>numberget view client width
getClientWidth: ()=>numberget view client height
getClientHeight: ()=>numberget an object with values about the current position.
getValues: ()=>IValues