In this tutorial, we are going to see how to implement Smooth Scrolling in React Js. Smooth scrolling is used to scroll to a div or section of page smoothly mot instantly. Here we are going to use react-scroll package on NPM to implement it.
Table of Content
- Getting Started with React Scroll
- Installing and Configuring React-Scroll
- Styling Top Links
- Adding Scroll to Top Button
Getting Started with React Scroll
React Scroll is a Component for animating vertical scrolling in React Js. Let go through step by step process to see the implementation.
Installing and Configuring React-Scroll
Here we are going to install and configure React-Scroll.
Run below command to install the package
npm install react-scroll
Further Reading: https://scotch.io/tutorials/implementing-smooth-scrolling-in-react