3.1.1 • Published 9 months ago

return-to-top v3.1.1

Weekly downloads
7
License
MIT
Repository
github
Last release
9 months ago

Return to top button

This script adds a button that will return the user to the top of the page. It's independent of other libraries and can self-initiate.

Settings

Settings can be added by instantiating the ReturnToTop class and passing in an object.

NameTypeDescription
placementenumside of the window the button will sit. Default is 'right', options are 'left' or 'right'.
colorstringcolor of the button. Will take any hex or rgba value. Default is '#A11222' (maroon)
arrowColorstringcolor of the rotating arrow inside the button. Will take any hex or rgba value. Default is '#ffffff' (white)
shapeenumshape of the button. Options are 'circle' or 'square'
animationobject | booleanSet whether to animate in or not
animation.fadebooleanSet whether to fade in or not
animation.rotatebooleanSet whether to rotate on scroll or not

Development

To build from source, run npm run build. Use npm run example to see it running in a browser on a simple test page.

3.1.1

9 months ago

3.1.0

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago