# scroll-to

> Smooth window scroll to position with requestAnimationFrame

Latest version **0.0.2** (published 2015-03-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install scroll-to
pnpm add scroll-to
yarn add scroll-to
bun add scroll-to
```

## 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.2 |
| Published | 2015-03-20 |
| First published | 2013-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 84 |
| Maintainers | tjholowaychuk, tootallnate |
| Keywords | scroll, animate, scroll-to |

## Links

- npm: https://www.npmjs.com/package/scroll-to
- Repository: https://github.com/component/scroll-to
- Issues: https://github.com/component/scroll-to/issues
- npm.io page: https://npm.io/package/scroll-to

## Dependencies (2)

- [component-raf](https://npm.io/package/component-raf.md) 1.2.0
- [component-tween](https://npm.io/package/component-tween.md) 1.2.0

## Alternatives

- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K weekly downloads
- [persona-harness](https://npm.io/package/persona-harness.md) — 4.7K weekly downloads
- [@tsparticles/effect-bubble](https://npm.io/package/@tsparticles/effect-bubble.md) — 4.6K weekly downloads
- [f3d](https://npm.io/package/f3d.md) — 730 weekly downloads
- [spark-html-motion](https://npm.io/package/spark-html-motion.md) — 298 weekly downloads

## Recent versions

- 0.0.2 (latest) — 2015-03-20
- 0.0.1 — 2013-05-28

## README

# scroll-to

  Smooth window scroll to position with requestAnimationFrame and [Tween](https://github.com/component/tween).

## Installation

    $ component install component/scroll-to

## API

### scrollTo(x, y, [options])

  Scroll to the given point `(x, y)` with the given `options`:

  - `ease` easing function defaulting to "out-circ" (view [ease](https://github.com/component/ease) for more)
  - `duration` animation duration defaulting to `1000`

```js
var scrollTo = require('scroll-to');

scrollTo(500, 1200, {
  ease: 'out-bounce',
  duration: 1500
});
```

## License

  MIT

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