React wrapper component for scroll up
npm install react-scrollup-lite> React wrapper component to scroll up/top when user scrolls the page
 
``bash`
npm install --save react-scrollup-lite
`jsx
import React, { Component } from 'react';
import ScrollUp from 'react-scrollup-lite';
class Example extends Component {
render() {
return (
showAtPosition={10}
position='right'
className='scroll-up'
style={{
right: '20px',
}}
>
);
}
}
``
| Props | Type | Description |
| ------------------- | ------ | ----------------------------------------------------------------------------- |
| startPosition | number | start position to scroll up |
| showAtPosition | number | when scrolling the page at what position component children should be visible |
| position (optional) | string | left or right (where to show the children component) (default - right) |
MIT © Madan Kumar