# react-spring-scroll-hook

> Simple hook for creating smooth scroll list with arrows.

Latest version **0.3.0** (published 2020-09-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-spring-scroll-hook
pnpm add react-spring-scroll-hook
yarn add react-spring-scroll-hook
bun add react-spring-scroll-hook
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2020-09-14 |
| First published | 2019-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 28.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Igor Adrov |
| Maintainers | nucleartux |

## Links

- npm: https://www.npmjs.com/package/react-spring-scroll-hook
- Repository: https://github.com/nucleartux/react-spring-scroll-hook
- npm.io page: https://npm.io/package/react-spring-scroll-hook

## Dependencies (2)

- [rebound](https://npm.io/package/rebound.md) ^0.1.0
- [react-use](https://npm.io/package/react-use.md) ^9.0.0

## Recent versions

- 0.3.0 (latest) — 2020-09-14
- 0.2.0 — 2020-05-26
- 0.1.3 — 2019-05-17
- 0.1.2 — 2019-05-17
- 0.1.1 — 2019-05-17

## README

# react-spring-scroll-hook

Simple hook for creating smooth scroll list with arrows.

![demo](assets/scroll.gif)

## Install

```
yarn add react-spring-scroll-hook
```

## Example

```
import useSpringScroll from 'react-spring-scroll-hook';

const {
  ref,
  left: handlePrevClick,
  reset: handleWheel,
  right: handleRightClick
} = useSpringScroll({ step: 100 });

return <div>
  <img src={arrowPrevIcon} onClick={handlePrevClick} />

  <div className="overflow" onWheel={handleWheel}>
    {children}
  </div>

  <img src={arrowNextIcon} onClick={handleRightClick} />
</div>
```

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