WhileTruu / elm-smooth-scroll / SmoothScroll

Scrolling to position that always takes the same amount of time.


type Config

Configuration for smooth scrolling.

createConfig : Ease.Easing -> Basics.Int -> Config

Create a smooth scroll configuration from an easing function and a duration in milliseconds.

createConfig Ease.outCubic 100

scrollTo : Config -> Basics.Float -> Task x ()

Scroll to the y offset of the browser viewport using the easing function and duration specified in the config.

scrollTo (createConfig Ease.outCubic 100) 500