# @owaiswiz/use-in-view

> Check if your component is in viewport using this simple hook!

Latest version **1.0.16** (published 2021-04-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @owaiswiz/use-in-view
pnpm add @owaiswiz/use-in-view
yarn add @owaiswiz/use-in-view
bun add @owaiswiz/use-in-view
```

## 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.16 |
| Published | 2021-04-19 |
| First published | 2021-01-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 2 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | owaiswiz |
| Keywords | hooks, react, in view, scroll, reveal, useInView, inView, use in view, in view, react hooks, scroll reveal |

## Links

- npm: https://www.npmjs.com/package/@owaiswiz/use-in-view
- Repository: https://github.com/owaiswiz/useInView
- Issues: https://github.com/owaiswiz/useInView/issues
- npm.io page: https://npm.io/package/@owaiswiz/use-in-view

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^17.0.2
- [lodash.throttle](https://npm.io/package/lodash.throttle.md) ^4.1.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.16 (latest) — 2021-04-19
- 1.0.15 — 2021-04-19
- 1.1.0 — 2021-01-03

## README

## useInView

Check if your component is in viewport using this simple hook!

[![Build Status](https://travis-ci.org/elinadenfina/useInView.svg?branch=master)](https://travis-ci.org/elinadenfina/useInView)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
![GitHub top language](https://img.shields.io/github/languages/top/elinadenfina/useinview.svg)
![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/use-in-view/1.0.7.svg)
![David](https://img.shields.io/david/elinadenfina/useinview.svg)

⭐ ⭐ Check out a working demo [here](https://elinadenfina.github.io/useInView/) ⭐ ⭐

## Install

```
$ yarn add use-in-view
```

## Usage

```jsx
import useInView from 'use-in-view';

const AnimatedComponent = () => {
	const offset = 30;
	const [ref, inView] = useInView(offset);

	return (
		<div className={`${inView && 'in-view'}`} ref={ref}>
			Animate me!
		</div>
	);
};
```

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