Skip to content

gillstrom/deku-scroll-up

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deku-scroll-up

"Scroll to top of page" component for deku

Install

$ npm install --save deku-scroll-up

Usage

import ScrollUp from 'deku-scroll-up';

export function render() {
	return (
		<ScrollUp show={150} duration={1000}>
			UP!
		</ScrollUp>
	);
}

Attributes

show

Required
Type: number

At what distance from top the element will be displayed.

top

Type: number
Default: 0

Position to which you will be moved on click.

duration

Type: number
Default: 500

Time in milliseconds it will take to reach the top position.

ease

Type: string
Default: out-circ

Type of scrolling easing. Complete list can be found here.

class

Type: string

Add classes to the element

License

MIT © Andreas Gillström

About

"Scroll to top of page" component for deku.

Resources

License

Stars

Watchers

Forks

Packages

No packages published