# momentum

> Add momentum to any DOM element with a simple API. It's like iScroll, except not for scrolling anything. `momentum` also supports mouse and touch events.

Latest version **4.0.0** (published 2017-12-09) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install momentum
pnpm add momentum
yarn add momentum
bun add momentum
```

## 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 | 4.0.0 |
| Published | 2017-12-09 |
| First published | 2015-11-19 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | PatrickJS |
| Maintainers | yearofmoo, gdi2290 |

## Links

- npm: https://www.npmjs.com/package/momentum
- Repository: https://github.com/gdi2290/momentum
- Homepage: https://github.com/gdi2290/momentum#readme
- Issues: https://github.com/gdi2290/momentum/issues
- npm.io page: https://npm.io/package/momentum

## Dependencies (1)

- [impetus](https://npm.io/package/impetus.md) ^0.8.7

## Recent versions

- 4.0.0 (latest) — 2017-12-09
- 3.0.0 — 2017-12-09
- 2.0.0 — 2017-12-09
- 1.0.1 — 2015-11-19
- 1.0.0 — 2015-11-19

## README

# Momentum [![Travis](https://img.shields.io/travis/rust-lang/rust.svg)]()
Add momentum to any DOM element with a simple API. It's like iScroll, except not for scrolling anything. `momentum` also supports mouse and touch events.

```js
const momentum = require('momentum')

// make sure the element is in the document and the document is fully loaded
window.addEventListener('DOMContentLoaded', () => {
  const box = document.querySelector('box')
  momentum(box, (x, y) => {
    console.log('x:', x, 'y:', y)
  })
})
```

[![NPM](https://nodei.co/npm/momentum.png)](https://npmjs.org/package/momentum)

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