Giter VIP home page Giter VIP logo

multiscroll's Introduction

Multiscroll Plugin

This plugin adds the funcion long scrolling + split screen in ReactJs. To see a live example you can go here

Installing

  1. Clone the repo
  2. npm install -g gulp to install Gulp globally.
  3. npm install to resolve project dependencies.

Using

Run npm start from the command line and you are good to go!

The project is currently setup to transpile code under the /src folder using the /src/app.js file as an entry point.

Our resulting code ends up in the public directory.

How does it work?

You must import the plugin with:

import Multigroup from 'multigroup';

The on your app you must create this structure:

<MultiGroup >
    <multiScroll>
        <leftSide>
              // Page1: Content Left here
        </leftSide>
        <rightSide>
              //page1: Content Right here
        </rightSide>
    </multiScroll>
    <multiScroll>
        <leftSide>
              // Page2: Content Left here
        </leftSide>
        <rightSide>
              // Page2: Content Right here
        </rightSide>
    </multiScroll>
</MultiGroup>

As you can see, everything is grouped with <Multigroup> tag. Be aware that Multigroup is the only tag which is capitalized, the rest are first letter downcase.

Each page is a <multiscroll> tag. Inside it, you just specify the <leftside> to put the content on the left div, and <rightside> to put the content on the rightside. That's it!

Set up animation time

To set up the animation time you can add the optionanimTime on tag. You can add a float number, so for example it could be something like<MultiScroll animTime={1.5} ```. The hashes are necessary to store a float number there.

IF you leave empty, by default will be 3.0 seconds.

Set up background color

Also, you can specify a default background color for an specific slide. To do that, you have the bgColor. You must put this option on <multiScroll>option.

Example: <multiScroll bgColor="#ededed" > . It's important to specify the # symbol and put inside quotes.

Special thanks

I took a boilerplate browserify + gulp + react + additional items that has been created by @Caike and @Sergiocruz ( both from Codeschool). I save up some time thanks to their configuration.

The jellyfish picture has been taken by @danist07.

The building picture has been taken by @aleccutter

Follow me on github

multiscroll's People

Contributors

caike avatar ruffeng avatar sergiocruz avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

abhishek-init

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.