# in-view-js

> Module for capturing element in viewport on native Javascript.

Latest version **1.0.2** (published 2017-03-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install in-view-js
pnpm add in-view-js
yarn add in-view-js
bun add in-view-js
```

## 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.0.2 |
| Published | 2017-03-18 |
| First published | 2017-03-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | bullettoothaxe@gmail.com |
| Maintainers | bullettoothaxe |
| Keywords | in-view, inView, in-view-js |

## Links

- npm: https://www.npmjs.com/package/in-view-js
- Repository: https://github.com/bullettoothaxe/in-view-js
- Homepage: https://github.com/bullettoothaxe/in-view-js#readme
- Issues: https://github.com/bullettoothaxe/in-view-js/issues
- npm.io page: https://npm.io/package/in-view-js

## Recent versions

- 1.0.2 (latest) — 2017-03-18
- 1.0.1 — 2017-03-18
- 1.0.0 — 2017-03-18

## README

# in-view-js
Module for capturing element in viewport on native Javascript.

Demo:
<a href="http://codepen.io/bullet_tooth/pen/XMRNWG" target="_blank">CodePen</a>

Usage:

```javascript
let element   = document.getElementById('test'),
    callback  = (isInView) => console.log('is Element visible?', isInView),
    overlapEl = document.getElementById('fixed-top-bar');

let inViewInstance = new InViewPort({
    element,
    callback,
    overlapEl
});

inViewInstance.addListeners();

/* ... */

inViewInstance.removeListeners();
```

**Feature:** Added "overlapEl" for counting overlapping elements (fixed top bars).

Tested with ES6 modules.

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