# @gitgw/use-fullscreen

> React Hook to make any element go Fullscreen.

Latest version **1.0.3** (published 2021-05-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @gitgw/use-fullscreen
pnpm add @gitgw/use-fullscreen
yarn add @gitgw/use-fullscreen
bun add @gitgw/use-fullscreen
```

## 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.3 |
| Published | 2021-05-13 |
| First published | 2021-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | GW |
| Maintainers | githubgw |
| Keywords | react, react-hooks, hooks, fullscreen, usefullscreen |

## Links

- npm: https://www.npmjs.com/package/@gitgw/use-fullscreen
- Repository: https://github.com/GitHubGW/react-hook-npm
- Homepage: https://github.com/GitHubGW/react-hook-npm#readme
- Issues: https://github.com/GitHubGW/react-hook-npm/issues
- npm.io page: https://npm.io/package/@gitgw/use-fullscreen

## 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.3 (latest) — 2021-05-13
- 1.0.2 — 2021-05-13
- 1.0.1 — 2021-05-13
- 1.0.0 — 2021-05-12

## README

# @gitgw/use-fullscreen
React Hook to make any element go Fullscreen.

## Installation
### npm
```npm i @gitgw/use-fullscreen```

### yarn
```yarn add @gitgw/use-fullscreen```

## Usage
```javascript
import React from "react";
import useFullscreen from "@gitgw/use-fullscreen";

function App() {
  const onChange = (isFull) => {
    console.log("onChange");
  }
  const { element, enterFullScreen, exitFullScreen } = useFullscreen(onChange);

  return (
    <div className="App">
      <button onClick={enterFullScreen}>enterFullScreen</button>;
      <button onClick={exitFullScreen}>exitFullScreen</button>;
    </div>
  );
}
```

### Arguments
Argument|Type|Description|Arguments|Required|
|-|-|-|-|-|
|onChange|Function|Function to be called when the screen goes Fullscreen or exits is|isFull: Boolean|no

### Return
```useFullscreen``` returns an object containing the following:
Return value|Type|Description|
|-|-|-|
|element|React ref|Ref to add to the element that you want to make fullscreen
|enterFullScreen|Function|Function to make the element enter fullscreen
|exitFullScreen|Function|Function to make the document exit fullscreen

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