deku-scroll-up

1.2.0 • Public • Published

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

Package Sidebar

Install

npm i deku-scroll-up

Weekly Downloads

1

Version

1.2.0

License

MIT

Last publish

Collaborators

  • alonalon
  • anton-johansson
  • gillstrom
  • henrikpeszlen
  • michaelbergquistsuarez