Socket
Socket
Sign inDemoInstall

@thecore/fullpage-react

Package Overview
Dependencies
3
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @thecore/fullpage-react

Stateful fullpage.js inspired scrolling for React


Version published
Maintainers
2
Install size
1.71 MB
Created

Readme

Source

Fullpage-React

Stateful fullpage.js inspired scrolling for React

This package is no longer maintained, and has been moved under the official fullpage.js project! Please use the official react-fullpage package!


Demo can be found here along with the source code

Starter Example

Basic Setup

// NPM
npm i fullpage-react --save

// Yarn
yarn add fullpage-react
Component Boilerplate
import { Fullpage, Slide, HorizontalSlider } from 'fullpage-react';

const fullPageOptions = {
  // for mouse/wheel events
  // represents the level of force required to generate a slide change on non-mobile, 10 is default
  scrollSensitivity: 7,

  // for touchStart/touchEnd/mobile scrolling
  // represents the level of force required to generate a slide change on mobile, 10 is default
  touchSensitivity: 7,
  scrollSpeed: 500,
  hideScrollBars: true,
  enableArrowKeys: true
};

const horizontalSliderProps = {
  name: 'horizontalSlider1', // name is required
  infinite: true, // enable infinite scrolling
};

const horizontalSlides = [
  <Slide> Slide 2.1 </Slide>,
  <Slide> Slide 2.2 </Slide>
];
horizontalSliderProps.slides = horizontalSlides;

const slides = [
  <Slide> Slide 1 </Slide>,
  <HorizontalSlider {...horizontalSliderProps}></HorizontalSlider>,
  <Slide> Slide 3 </Slide>
];
fullPageOptions.slides = slides;

<Fullpage {...fullPageOptions} />

Events API

There are two functions located on the Fullpage class. These are used for manually changing the vertical and horizontal slides via UI events.

There are also two optional props for <Fullpage/> that will send data onSlideChangeStart and onSlideChangeEnd

Sliding can be cancelled in the event that you want the user to stay fixed on a slide for some reason. If the function passed to onSlideChangeStart returns true, sliding can be cancellabe until it returns falsy.

An example can be found here here

Keywords

FAQs

Last updated on 07 Sep 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc