
Description
react-scroll-up is a React component that adds a button for scrolling back to the top of a page. You supply the button's content, such as an arrow or the word UP, and the component shows it once the page has been scrolled past a set position. The main parameter, showUnder, is required and sets the scroll position in pixels at which the button appears and stays visible below it. The optional topPosition sets where the scroll ends, with a default of 0, and duration sets the scroll time in milliseconds, with a default of 250. The easing option chooses the motion curve, with easeOutCubic as the default, and a list of available easing types is linked from the README. The component also takes onShow and onHide callback functions, and a style object for the button's position and look.…
Highlights
- Scroll-to-top button for React
- Set show position and scroll target
- Duration and easing options
- onShow and onHide callbacks
Ratings & Reviews
No ratings yet
Be the first to rate react-scroll-up.
People also visit

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

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

react-waypoint
A React component to execute a function whenever you scroll to an element
react-scroll-up FAQ
What is react-scroll-up?
A React component that shows a button for scrolling back to the top of a page.
How do I install it?
The README has an install section with the npm command.
How do I set when the button shows?
Use the showUnder property. It is required and takes a position in pixels.
Can I change the scroll speed or style?
Yes. duration sets the scroll time, easing sets the motion curve, and style lets you change the button's look and position.
Does it work in old browsers?
It uses requestAnimationFrame, and the README suggests a polyfill for older browsers such as IE9 and earlier.
What are the best react-scroll-up alternatives?
Popular alternatives to react-scroll-up include react-scroll, react-scroll-trigger and react-custom-scroll. See all react-scroll-up alternatives
















