A React component that allows the user to return to the top of the page with a click.
Start installing with the command below:
npm i react-go-to-top
Import the component into your project and use It:
// Import
import BackToTop from "react-go-to-top";
// Use
<BackToTop />
You can customize the component using some props:
Prop | Default |
---|---|
backgroundColor | #000 |
icon | svg |
size | 24 |
offsetToShow | 100 |
borderRadius | 24 |
zIndex | 100 |
bottom | 24 |
right | 24 |