react-scroll-top
v1.0.4
Published
Smoothly scrolls page to it's top
Downloads
11
Maintainers
Readme
react-scroll-top
This React component provides a simple customisable button that scrolls page to it's top
Install
npm install react-scroll-top
Usage
<ToTop hideAt={160} position="top" />
Parameters
hideAt:number in px
When to hide the button
position:string
Where to show the button
Might be: top, bottom
default: top
style:object (optional)
default:
{
backgroundColor: 'rgba(255,255,255,0.35)',
borderRadius: '50%',
cursor: 'pointer'
}