Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-skrollr

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-skrollr

React Component parallax scrolling JavaScript library base on Skrollr

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
101
decreased by-36.87%
Maintainers
1
Weekly downloads
 
Created
Source

React Skrollr

npm version

React Component parallax scrolling JavaScript library base on Skrollr

See live demo

Getting Started

$ npm install --save react-skrollr

Import package

import { ParallaxProvider, Parallax } from 'react-skrollr'

Init config (Optional)

Use init config via props init (props type is object)

Skrollr init Options

Add <ProviderParallax> in to root app

class App extends React.Component {
  render() {
    return (
      <ParallaxProvider
        init={{
          smoothScrollingDuration: 500,
          smoothScrolling: true,
          forceHeight: false
        }}
      >
      ...
      </ParallaxProvider>
    )
  }
}

Setting parallax data (Required)

Use data scrolling via props data (props type is object)

Skrollr Data attr document

const Component = () => {
  return (
    <Parallax
      data={{
        'data-center-center': 'opacity: 1;',
        'data-bottom-top': 'opacity: 0;'
      }}
    >Some content</Parallax>
  )
}

Example use

  class App extends React.Component {
    render() {
      return (
        <ParallaxProvider>
          <Parallax
            data={{
              'data-center-center': 'opacity: 1;',
              'data-bottom-top': 'opacity: 0;'
            }}
          >
            Some content or Component
          </Parallax>
        </ParallaxProvider>
      );
    }
  }

Thank you for your suggestions!

Keywords

FAQs

Package last updated on 02 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc