react-scroll-top

1.0.4 • Public • Published

react-scroll-top

npmversion

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'
}

Package Sidebar

Install

npm i react-scroll-top

Weekly Downloads

3

Version

1.0.4

License

ISC

Last publish

Collaborators

  • nmrvtz