Nobody Publish Monsters

    fullscreen-react

    1.0.5 • Public • Published

    fullscreen-react

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

    Usage

    Install.

    yarn add fullscreen-react

    Import component.

    import Fullscreen from 'fullscreen-react';

    Setup and render.

    import React, { useState } from "react";
    import Fullscreen from "fullscreen-react";
    
    function App() {
      const [isEnter, setIsEnter] = useState(false);
    
      return (
        <div>
          <button
            onClick={() => {
              setIsEnter(true);
            }}
          >
            Go Fullscreen
          </button>
    
          <Fullscreen isEnter={isEnter} onChange={setIsEnter}>
            <div>
              Hi! This may cover the entire monitor.
            </div>
          </Fullscreen>
        </div>
      );
    }
    
    export default App;

    Install

    npm i fullscreen-react

    DownloadsWeekly Downloads

    240

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    7.53 kB

    Total Files

    6

    Last publish

    Collaborators

    • ranqiwu