Demo: https://framer.cloud/hYCvI
Place scrollcomponentwithbar.coffee
into myproject.framer/modules
ScrollComponentWithBar = require 'scrollcomponentwithbar'
myScroller = new ScrollComponentWithBar
scrollVisible: "visible"
scrollTrackColor: "rgba(0,0,0,0.1)"
scrollTrackColor: "rgba(0,0,0,0.6)"
ScrollComponentWithBar is an extension of ScrollComponent, and all options are inherited from that class. Documentation for that can be found here. Additional options below.
scrollVisible
— Acceptsvisible
,hidden
, orauto
. Defaults toauto
scrollTrackColor
— Accepts a Color object. Defaults tonull
scrollThumbColor
— Accepts a Color object. Defaults torgba(0,0,0,0.5)
- The scroll bar automatically hides if the content is shorter than the component height (ie. if there is no scrollable content).
- The scroll bar height and y-position automatically update as the ScrollComponentWithBar content updates.