"Scroll to top of page" component for deku
$ npm install --save deku-scroll-up
import ScrollUp from 'deku-scroll-up';
export function render() {
return (
<ScrollUp show={150} duration={1000}>
UP!
</ScrollUp>
);
}
Required
Type: number
At what distance from top the element will be displayed.
Type: number
Default: 0
Position to which you will be moved on click.
Type: number
Default: 500
Time in milliseconds it will take to reach the top
position.
Type: string
Default: out-circ
Type of scrolling easing. Complete list can be found here.
Type: string
Add classes to the element
MIT © Andreas Gillström