Scrollbar component for React
textarea
element and contenteditable
elements - Issues #77 #107 #104scrollArea
prop on t
. This is deprecated and will not work in production with the next major version" - Issue #74focusableTabIndex
prop (1)stopScrollPropagation
prop - after set to true, mouse wheel event will not propagatefocussableTabIndex
prop - after set to a number, scrollarea-content is rendered with a tabindex value set to the passed insmoothScrolling
prop - when set to true, smooth scrolling for both scrollbars is enabled.minScrollSize
prop - using this prop it's possible to set minimal size in px for both scrollbars.swapWheelAxes
prop - after set to true, mouse wheel event has swapped directions. So normal scrolling moves horizontal scrollbar and scrolling with SHIFT key moves vertical scrollbar. It could be useful for applications with horizontal layout. var ScrollArea = require('react-scrollbar/no-css');
react-scrollbar
in no-css versiononScroll
onScroll(value: Object)
event which can notify the parent component when the container scrolls.
value: Object
- informations about current position
value.leftPosition: Number
- content left position (distance in pixels from the left side of container)value.topPosition: Number
- content top position (distance in pixels from the top of container)value.containerHeight: Number
- container heightvalue.containerWidth: Number
- container widthvalue.realHeight: Number
- real content heightvalue.realWidth: Number
- real content widthcontentWindow
, ownerDocument
props to use scrollarea inside iframe.contentWindow
- default: windowownerDocument
- default: document