react-back-to-top-progress-indicator
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

react-back-to-top-progress-indicator

NPM version Build npm-typescript

License

A lightweight button component that scrolls to the top of a page when pressed with a page progress indicator The button is only visible once a certain height has been reached on the page with smooth animation

Installation

With npm:

npm install react-back-to-top-progress-indicator

With yarn:

yarn add react-back-to-top-progress-indicator

Usage

Import and then add at the bottom of your return function (for a11y reasons):

import { BackToTop } from 'react-back-to-top-progress-indicator'

function CoolPage() {
  return (
    <div style={{ height: '3000px' }}>
      <h1>Hello, world!</h1>
      <BackToTop />
    </div>
  )
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Package Sidebar

Install

npm i react-back-to-top-progress-indicator

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

20 kB

Total Files

23

Last publish

Collaborators

  • badaoui220