# @zhangmmm/react-onepage

> react 单页滚动插件

Latest version **0.0.1** (published 2020-04-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install @zhangmmm/react-onepage
pnpm add @zhangmmm/react-onepage
yarn add @zhangmmm/react-onepage
bun add @zhangmmm/react-onepage
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-04-11 |
| First published | 2020-04-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | qianzm2490@vip.qq.com |
| Maintainers | zhangmmm |
| Keywords | react, onepage, react-onepage, fullpage |

## Links

- npm: https://www.npmjs.com/package/@zhangmmm/react-onepage
- Repository: https://github.com/zhangminggeek/react-onepage
- Homepage: https://github.com/zhangminggeek/react-onepage#readme
- Issues: https://github.com/zhangminggeek/react-onepage/issues
- npm.io page: https://npm.io/package/@zhangmmm/react-onepage

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^16.13.0
- [react-dom](https://npm.io/package/react-dom.md) ^16.13.0
- [lodash.throttle](https://npm.io/package/lodash.throttle.md) ^4.1.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2020-04-11

## README

# react-onepage

本库可用于快速创建单页滚动（全屏滚动）效果组件，并提供可配置动画效果及相关钩子

## 用法

### 安装

```
npm install @zhangmmm/react-onepage --save
```

### 例子

```jsx
import React from 'react';
import { render } from 'react-dom';
import OnePage from '@zhangmmm/react-onepage';

const App = () => (
  <OnePage>
    <div style={{ height: '100vh', backgroundColor: 'green' }}></div>
    <div style={{ height: '100vh', backgroundColor: 'red' }}></div>
    <div style={{ height: '100vh', backgroundColor: 'blue' }}></div>
    <div style={{ height: '100vh', backgroundColor: 'yellow' }}></div>
  </OnePage>
);

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

## API

| 属性            | 说明                 | 类型     | 默认值 |
| --------------- | -------------------- | -------- | ------ |
| speed           | 过渡动画速度(ms)     | Number   | 1500   |
| animation       | 过渡动画类型         | String   | ease   |
| delay           | 过渡动画延迟时间(ms) | Number   | 0      |
| onTransitionEnd | 过渡动画结束回调     | Function | -      |

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