# scroll-smooth

> Scroll with _smooth_ gestures

Latest version **1.1.1** (published 2022-01-25) · MIT license · 0 weekly downloads

## Install

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

## 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.1.1 |
| Published | 2022-01-25 |
| First published | 2017-03-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 66.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Lionel T |
| Maintainers | elrumordelaluz |
| Keywords | scroll, smooth |

## Links

- npm: https://www.npmjs.com/package/scroll-smooth
- Repository: https://github.com/Pixeden/scroll-smooth
- Homepage: https://github.com/Pixeden/scroll-smooth#readme
- Issues: https://github.com/Pixeden/scroll-smooth/issues
- npm.io page: https://npm.io/package/scroll-smooth

## Recent versions

- 1.1.1 (latest) — 2022-01-25
- 1.1.0 — 2017-12-19
- 1.0.1 — 2017-03-16
- 1.0.0 — 2017-03-16

## README

# scroll-smooth

Scroll with _smooth_ gestures

### API

```js
/**
 * Simple 
 */
scrollSmooth.to(elem|position)

// like
scrollSmooth.to(document.querySelector('.myElem'))
// or 
scrollSmooth.to(700)

/**
 * With Options
 */
scrollSmooth.to(elem|position, {
  duration,
  context,
  offset,
  ease,
  callback,
})

// like
scrollSmooth.to(document.querySelector('.myElem'), {
  duration: 1500
  offset: 100,
  callback: elem => console.log(`Yup! Hi ${elem}!`),
})

// or 
scrollSmooth.to(document.querySelector('.another'), {
  context: document.querySelector('.parent')
  callback: elem => console.log(`Yup! ${elem} inside a context different than window!`),
})
```

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