# react-scrollpage

> A simple react-fullPage component.

Latest version **1.0.2** (published 2016-08-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-scrollpage
pnpm add react-scrollpage
yarn add react-scrollpage
bun add react-scrollpage
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2016-08-19 |
| First published | 2016-08-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | toxni |
| Maintainers | toxni |

## Links

- npm: https://www.npmjs.com/package/react-scrollpage
- Repository: https://github.com/Toxni/react-fullPage
- Homepage: https://github.com/Toxni/react-fullPage#readme
- Issues: https://github.com/Toxni/react-fullPage/issues
- npm.io page: https://npm.io/package/react-scrollpage

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^15.3.0
- [react-dom](https://npm.io/package/react-dom.md) ^15.3.0

## Recent versions

- 1.0.2 (latest) — 2016-08-19
- 1.0.1 — 2016-08-19
- 1.0.0 — 2016-08-19

## README

## Why another react-fullPage?
* Simpler & Smaller
* ES6
* Follow ESlint (Airbnb)
* Adapt to our [generator-modation](https://github.com/zhaozhiming/generator-modation) (It's a comfortable react-redux generator)

## Install

`npm install react-scrollpage`

## Usage

```
import { ScrollPage, Section } from 'react-scrollpage';

class Foo extends Component {
  render() {
    return (
      <ScrollPage
        curPage={1}
        totalPage={4}
      >
        <Section>
          Page1
        </Section>
        <Section>
          Page2
        </Section>
        <Section>
          Page3
        </Section>
        <Section>
          Page4
        </Section>
      </ScrollPage>
    )
  }
}

var app = document.getElementById('app');
ReactDOM.render(<Foo />, app);
```


## Example

```
npm install

cd ./example
webpack

// That's it! Open example/index.html directly.
```

## API
```
window.turnTo(number);

// 0 < number <= totalPage

```
If `number < 0 || number > totalPage` , it will not print any error but keep scrolling to target position. `transform to window.innerHeight * number`

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