1.1.2 • Published 2 years ago

react-easyfullscreen v1.1.2

Weekly downloads
73
License
MIT
Repository
github
Last release
2 years ago

React FullScreen

npm version License: MIT Node.js CI Netlify Status Language grade: JavaScript

Component that performs fullscreen in DOM Elements

Installation

npm i react-easyfullscreen
// OR
yarn add react-easyfullscreen

Demo Link

Local demo:

git clone https://github.com/andrelmlins/react-fullscreen.git
cd react-fullscreen
npm install && npm run start

Examples

import React from 'react';
import { render } from 'react-dom';
import ReactFullscreen from 'react-easyfullscreen';

const App = () => (
  <ReactFullscreen>
    {({ ref, onRequest, onExit }) => (
      <div
        ref={ref}
        style={{ backgroundColor: 'red', width: 120, height: 120 }}
      >
        <button onClick={() => onRequest()}>FullScreen</button>
        <button onClick={() => onExit()}>Screen</button>
      </div>
    )}
  </ReactFullscreen>
);

render(<App />, document.getElementById('root'));

Properties

Raw component props (before transform):

PropTypeDescription
onChangefuncCall in change
onErrorfuncCall in error

Children Function Properties

PropTypeDescription
refobjectRef dom element
isEnabledboolIf it's possible fullscreen
onTogglefuncCall for fullscreen toggle
onExitfuncCall for fullscreen exit
onRequestfuncCall for fullscreen enter

Browsers Support

You can see the list of supported browsers here

Browsers support

NPM Statistics

Download stats for this NPM package

NPM

License

React FullScreen is open source software licensed as MIT.

1.1.2

2 years ago

1.1.1

3 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.4.1

4 years ago

0.4.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago