@nzambello/react-scrolltop

0.1.2 • Public • Published

react-scrolltop

license npm version npm

React component that adds a 'scroll to top' button fixed on the bottom of the page and shown if not scrolled up.

Installation

Install the package with either yarn or npm.

With yarn:

yarn add @nzambello/react-scrolltop

With npm:

npm install --save @nzambello/react-scrolltop

Usage

import React from 'react'
import ReactDOM from 'react-dom'
import ScrollTop from '@nzambello/react-scrolltop'

const App = () => (
  ...
  <ScrollTop />
)

ReactDOM.render(<App />, document.getElementById('root'))

Readme

Keywords

none

Package Sidebar

Install

npm i @nzambello/react-scrolltop

Weekly Downloads

2

Version

0.1.2

License

MIT

Unpacked Size

40 kB

Total Files

12

Last publish

Collaborators

  • nzambello