# react-fully-scrolled

> Full page scrolling for react

Latest version **1.0.4** (published 2017-09-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-fully-scrolled
pnpm add react-fully-scrolled
yarn add react-fully-scrolled
bun add react-fully-scrolled
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2017-09-30 |
| First published | 2016-12-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Gilad Dayagi |
| Maintainers | giladaya |
| Keywords | react-component, full-page, scroll |

## Links

- npm: https://www.npmjs.com/package/react-fully-scrolled
- Repository: https://github.com/giladaya/react-fully-scrolled
- Homepage: https://giladaya.github.io/react-fully-scrolled/
- Issues: https://github.com/giladaya/react-fully-scrolled/issues
- npm.io page: https://npm.io/package/react-fully-scrolled

## Dependencies (3)

- [react](https://npm.io/package/react.md) >15.4.1
- [react-dom](https://npm.io/package/react-dom.md) >15.4.1
- [prop-types](https://npm.io/package/prop-types.md) >15.4.1

## Recent versions

- 1.0.4 (latest) — 2017-09-30
- 1.0.3 — 2016-12-26
- 1.0.2 — 2016-12-17
- 1.0.1 — 2016-12-14
- 1.0.0 — 2016-12-14

## README

# React Fully Scrolled

[![NPM version][npm-image]][npm-url]

[npm-image]: http://img.shields.io/npm/v/react-fully-scrolled.svg?style=flat-square
[npm-url]: http://npmjs.org/package/react-fully-scrolled


A full-page scroll component for react with support for touch events.  
Inspired by [react-fullpage](https://github.com/Toxni/react-fullPage)

* Simple  
* Performant  
* Touch support


[Live Demo](https://giladaya.github.io/react-fully-scrolled/)

## Usage

`npm install react-fully-scrolled`  

For mobile compatibility, make sure to disable touchmove events, like so: 
```js
document.ontouchmove = function(ev) {
  ev.preventDefault();
}
```

### Simple Example

```js
import React, { Component } from 'react'
import { render } from 'react-dom'
import { Scroller, Section } from 'react-fully-scrolled';

class Pages extends React.Component {
  render() {
    return (
      <Scroller
        curPage={1}
        onBeforeScroll={(from, to) => {}}
        onAfterScroll={(page) => {}}
        isEnabled={true}
      >
        <Section>
          Page1
        </Section>
        <Section>
          Page2
        </Section>
        <Section>
          Page3
        </Section>
        <Section>
          Page4
        </Section>
      </Scroller>
    )
  }
}

render(<Pages />, document.getElementById('root'));
```

### API

When the component is mounted, a function is added to the global scope:  
`window.fpTurnTo(pageNum)`

## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md)

---
_Source: https://npm.io/package/react-fully-scrolled · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
