Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yurayarosh/fullpage-pagination

Js plugin for making fullpage pagination
https://github.com/yurayarosh/fullpage-pagination

Last synced: about 1 month ago
JSON representation

Js plugin for making fullpage pagination

Awesome Lists containing this project

README

        

# fullpage-pagination

### Example

* [Basic](https://codesandbox.io/s/fullpage-pagination-example-srixb)
* [CustomTransitions](https://codesandbox.io/s/fullpage-pagination-custom-transition-mrrui)

### Install

```html
npm i fullpage-pagination
```

```html



section-1

section-2

section-3

section-4

section-5


button anchor to section 3

link anchor to section 3 from another page
```

```js
import { Fullpage, addTouchEvents } from 'fullpage-pagination';
addTouchEvents();

const page = document.querySelector('.js-fullpage');
const options = {
// some options
};

const fullpage = new Fullpage(page, options);
fullpage.init();
```

### Options

Standart options
```js
{
transition: 500, // slide transition in miliseconds
easing: 'ease', // slide transition easing
navigation: false, // html nav container
renderNavButton: false, // (i) => { // return button html }
prevButton: false, // prev button html element
nextButton: false, // next button html element
fadeIn: false, // fade effect
fadeInDuration: 500, // fade effect duration
customTransition: false, // no effects, just toggle active classnames
touchevents: false, // pagination on touchevents
loop: false, // loop option
toggleClassesFirst: false // if true - toggle sections classes before animation
}
```

### Events

```js
fullpage.afterLoad = () => {
// some callback
};
fullpage.onExit = (section, resolve) => {
// some callback
};
fullpage.onEnter = (section, resolve) => {
// some callback
};
fullpage.onComplete = () => {
// some callback
};
```