All Projects → alvarotrigo → React Fullpage

alvarotrigo / React Fullpage

Licence: gpl-3.0
Official React.js wrapper for fullPage.js https://alvarotrigo.com/react-fullpage/

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Fullpage

Angular Fullpage
Official Angular wrapper for fullPage.js https://alvarotrigo.com/angular-fullpage/
Stars: ✭ 131 (-81.47%)
Mutual labels:  slideshow, fullscreen, scrolling, snap
Fullpage.js
fullPage plugin by Alvaro Trigo. Create full screen pages fast and simple
Stars: ✭ 32,974 (+4563.93%)
Mutual labels:  slideshow, fullscreen, scrolling, snap
Vue Fullpage.js
Official Vue.js wrapper for fullPage.js http://alvarotrigo.com/vue-fullpage/
Stars: ✭ 1,626 (+129.99%)
Mutual labels:  slideshow, fullscreen, scrolling, snap
Multiscroll.js
multiscroll plugin by Alvaro Trigo. Create scrolling split websites. http://alvarotrigo.com/multiScroll/
Stars: ✭ 1,537 (+117.4%)
Mutual labels:  slideshow, scrolling, snap
cachu-slider
🌈 🔆 Create animated full screen and content-fit sliders efficiently.
Stars: ✭ 30 (-95.76%)
Mutual labels:  slideshow, scrolling
Scroll Snap
↯ Snap page when user stops scrolling, with a customizable configuration and a consistent cross browser behaviour
Stars: ✭ 187 (-73.55%)
Mutual labels:  scrolling, snap
Pageable
Create full page scrolling web pages. No jQuery.
Stars: ✭ 199 (-71.85%)
Mutual labels:  slideshow, scrolling
Pagepiling.js
pagePiling plugin by Alvaro Trigo. Create a scrolling pile of sections. http://alvarotrigo.com/pagePiling/
Stars: ✭ 3,993 (+464.78%)
Mutual labels:  scrolling, snap
Yjbannerview
【抱歉,暂时不提供开源】A very popular and highly customized banner view, 无限循环滚动轮播图BannerView、焦点图, 支持Cocoapods 及 Carthage. 支持完全自定义
Stars: ✭ 506 (-28.43%)
Mutual labels:  scrolling
Libresignage
A free and open source digital signage solution.
Stars: ✭ 599 (-15.28%)
Mutual labels:  slideshow
Theia Sticky Sidebar
Glues your website's sidebars, making them permanently visible while scrolling.
Stars: ✭ 489 (-30.83%)
Mutual labels:  scrolling
Vue Chat Scroll
🖱️ Vue directive to keep things scrolled to the bottom.
Stars: ✭ 517 (-26.87%)
Mutual labels:  scrolling
Videoshow
Simple node.js utility to create video slideshows from images with optional audio and visual effects using ffmpeg
Stars: ✭ 618 (-12.59%)
Mutual labels:  slideshow
Tauonmusicbox
The Linux desktop music player from the future! 🌆
Stars: ✭ 494 (-30.13%)
Mutual labels:  snap
Backslide
💦 CLI tool for making HTML presentations with Remark.js using Markdown
Stars: ✭ 679 (-3.96%)
Mutual labels:  slideshow
Argos Translate
Open source neural machine translation in Python. Designed to be used either as a Python library or desktop application. Uses OpenNMT for translations and PyQt for GUI.
Stars: ✭ 475 (-32.81%)
Mutual labels:  snap
Dxwrapper
Fixes compatibility issues with older games running on Windows 10 by wrapping DirectX dlls. Also allows loading custom libraries with the file extension .asi into game processes.
Stars: ✭ 460 (-34.94%)
Mutual labels:  fullscreen
Sticky State
StickyState is a high performant module making native position:sticky statefull and polyfilling the missing sticky browser feature
Stars: ✭ 692 (-2.12%)
Mutual labels:  scrolling
Webslides
Create HTML presentations in seconds —
Stars: ✭ 5,778 (+717.26%)
Mutual labels:  slideshow
Vue Parallax
🌌 Vue.js component for parallax image scroll effects
Stars: ✭ 569 (-19.52%)
Mutual labels:  scrolling

react-fullpage

preview

Official React wrapper for the fullpage.js library

react-fullpage version

Browsers support

IE / EdgeIE / Edge FirefoxFirefox ChromeChrome SafariSafari iOS SafariiOS Safari SamsungSamsung OperaOpera
IE11, Edge last 2 versions last 2 versions last 2 versions last 2 versions last 2 versions last 2 versions

Table of Contents

Installation

npm install @fullpage/react-fullpage

This will install the wrapper as well as fullpage.js

License

Non open source license

If you want to use react-fullpage to develop non open sourced sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Which means, you won't have to change your whole application's source code to an open source license. Purchase a Fullpage Commercial License.

Open source license

If you are creating an open source application under a license compatible with the GNU GPL license v3, you may use fullPage under the terms of the GPLv3.

The credit comments in the JavaScript and CSS files should be kept intact (even after combination or minification)

Read more about fullPage's license.

Usage

This wrapper creates a <ReactFullpage /> component. It exposes a render-prop API so markup can remain the same across fullpage.js libraries. The render prop accepts 1 parameter in its callback which contains the component's react properties state, context, etc.

UMD

A umd bundle is available for those without a build step

import ReactFullpage from '@fullpage/react-fullpage-umd'; // will return static version on server and "live" version on client

Server Side Rendering

SSR is supported however the server-rendered html will not be styled, this is because window must be present in order to properly set height + width of slides. So long as you rehydrate your fullpage component in the browser environment, regular styles will be applied.

When using SSR or a framework such as next.js, the component adjusts itself dynamically according to the presence of window

import ReactFullpage from '@fullpage/react-fullpage'; // will return static version on server and "live" version on client

SSR Examples: You can find a Gatsby and a Next.js examples in the "examples" folder. But here you have others too: gatsby next.js

Examples

In-depth examples can be found here. You can start with the React Example.

Quickstart Example:

import React from 'react';
import ReactDOM from 'react-dom';
import ReactFullpage from '@fullpage/react-fullpage';

const Fullpage = () => (
  <ReactFullpage
    //fullpage options
    licenseKey = {'YOUR_KEY_HERE'}
    scrollingSpeed = {1000} /* Options here */

    render={({ state, fullpageApi }) => {
      return (
        <ReactFullpage.Wrapper>
          <div className="section">
            <p>Section 1 (welcome to fullpage.js)</p>
            <button onClick={() => fullpageApi.moveSectionDown()}>
              Click me to move down
            </button>
          </div>
          <div className="section">
            <p>Section 2</p>
          </div>
        </ReactFullpage.Wrapper>
      );
    }}
  />
);

ReactDOM.render(<Fullpage />, document.getElementById('react-root'));

Fullpage.js Extension Example:

import React from 'react';
import ReactDOM from 'react-dom';
import ReactFullpage from '@fullpage/react-fullpage';

// NOTE: if using fullpage extensions/plugins put them here and pass it as props
const pluginWrapper = () => {
  require('./statics/fullpage.scrollHorizontally.min');
};

const Fullpage = () => (
  <ReactFullpage
    pluginWrapper = {pluginWrapper}

    //fullpage options
    licenseKey = {'YOUR_KEY_HERE'}
    scrollingSpeed = {1000} /* Options here */
    scrollHorizontally = {true}  /* Because we are using the extension */
    scrollHorizontallyKey = {'YOUR KEY HERE'}

    render={({ state, fullpageApi }) => {
      return (
        <ReactFullpage.Wrapper>
          <div className="section">
            <p>Section 1 (welcome to fullpage.js)</p>
            <button onClick={() => fullpageApi.moveSectionDown()}>
              Click me to move down
            </button>
          </div>
          <div className="section">
            <p>Section 2</p>
          </div>
        </ReactFullpage.Wrapper>
      );
    }}
  />
);

ReactDOM.render(<Fullpage />, document.getElementById('react-root'));

Notice that when using any fullPage.js extension you'll pass the pluginWrapper function prop to include the file for those features before the react-fullpage component mounted.

State

The wrapper maintains state in accordance to the latest version of fullpage.js callbacks

The most recent callback event that triggered a state change will be available as state.lastEvent

NOTE: if the v2 prop is passed, state will be mapped to v2 callbacks

Props

You can use any options supported by fullPage.js library as react props.

Props object can contain standard options as well as fullPage.js callbacks.

Example

More on callbacks here

Methods

fullPage.js contains many methods. You can use any of them. These are made available as properties on the imported fullpage.js library once the first render has occured.

Callbacks

Each callback name passed to the component will maintain state itself and this will be reflected via the render prop Callback parameters and the latest callback fired by fullpage.js will be reflected in state.

Styles

All fullpage.js styles are loaded from the component via a <style/> tag created with javascript. To override fullpage.js styles you must match specificity. Example here in the overrides.css file

Contributing

Found an issue? Have an idea? Check out the Contributing guide and open a PR

Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].