- Notifications
You must be signed in to change notification settings - Fork7
Component that performs fullscreen in DOM Elements
License
NotificationsYou must be signed in to change notification settings
andrelmlins/react-fullscreen
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Component that performs fullscreen in DOM Elements
npm i react-easyfullscreen// ORyarn add react-easyfullscreen
DemoLink
Local demo:
git clone https://github.com/andrelmlins/react-fullscreen.gitcd react-fullscreennpm install && npm run start
importReactfrom'react';import{render}from'react-dom';importReactFullscreenfrom'react-easyfullscreen';constApp=()=>(<ReactFullscreen>{({ ref, onRequest, onExit})=>(<divref={ref}style={{backgroundColor:'red',width:120,height:120}}><buttononClick={()=>onRequest()}>FullScreen</button><buttononClick={()=>onExit()}>Screen</button></div>)}</ReactFullscreen>);render(<App/>,document.getElementById('root'));
Raw component props (before transform):
Prop | Type | Description |
---|---|---|
onChange | func | Call in change |
onError | func | Call in error |
Prop | Type | Description |
---|---|---|
ref | object | Ref dom element |
isEnabled | bool | If it's possible fullscreen |
onToggle | func | Call for fullscreen toggle |
onExit | func | Call for fullscreen exit |
onRequest | func | Call for fullscreen enter |
You can see the list of supported browsershere
Download stats for this NPM package
React FullScreen is open source softwarelicensed as MIT.
About
Component that performs fullscreen in DOM Elements
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.