Skip to content

Repository files navigation

fullscreen-react

A React component that sets its children to fullscreen using the Fullscreen API.

Usage

Install.

yarn add fullscreen-react

Import component.

importFullscreenfrom'fullscreen-react';

Setup and render.

importReact,{useState}from"react";importFullscreenfrom"fullscreen-react";functionApp(){const[isEnter,setIsEnter]=useState(false);return(<div><buttononClick={()=>{setIsEnter(true);}}>
Go Fullscreen
</button><FullscreenisEnter={isEnter}onChange={setIsEnter}><div>
Hi! This may cover the entire monitor.
</div></Fullscreen></div>);}exportdefaultApp;

About

A React component that sets its children to fullscreen using the Fullscreen API.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages