Description
react-scroll is a lightweight React component library for animating vertical scrolling in React applications. It is for single-page applications, portfolio sites and larger web apps that need smooth scrolling between sections of a page. The README says it works with the latest versions of Chrome, Edge and Firefox. Its features include smooth scrolling animations between page sections, customisable scroll behaviour, support for accessibility needs and a small bundle size. Its components include links and elements that navigate to sections of a page and can mark the link for the section currently in view. Its options cover the active class and style, the target to scroll to, the container to listen to, updating the URL hash as you scroll, the animation duration, which can be a number or a function, and an extra offset such as padding. The project documents scroll methods, scroll events, best practices and troubleshooting, and it includes examples such as a basic setup, a keydown example, a container example, a hash example, and a Next.js example. The repository is on GitHub at fisshy/react-scroll.…
Highlights
- Smooth scrolling between page sections
- Links that highlight the section in view
- Configurable duration and offset
- Scroll methods and events
- Next.js and other examples
Ratings & Reviews
No ratings yet
Be the first to rate react-scroll.
People also visit

react-scrollchor
A React component for scrolling to #hash links with smooth animations

react-custom-scroll
Easily customize the browser scroll bar with native OS scroll behavior

react-waypoint
A React component to execute a function whenever you scroll to an element
react-animate-on-scroll
React component to animate elements on scroll with animate.css
react-scroll FAQ
What does react-scroll do?
It animates vertical scrolling between sections of a React page, with links that navigate to them.
Which browsers are supported?
The README says it works with the latest versions of Chrome, Edge and Firefox.
Can I change how long the scroll takes?
Yes. The duration can be a fixed number or a function of the scroll distance.
Can the link show which section is active?
Yes. Links can apply an active class or style when their section is reached.
Are there examples?
Yes, including basic, keydown, container, hash and Next.js examples in the repository.
What are the best react-scroll alternatives?
Popular alternatives to react-scroll include react-scrollchor, react-custom-scroll and react-waypoint. See all react-scroll alternatives


















