Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.37 KB

README.md

File metadata and controls

50 lines (37 loc) · 1.37 KB

Fullscreen any dom element with ReactJS

NuGet version

Installation

npm i react-fullscreen-element

Usage Example

import ReactFullScreenElement from "react-fullscreen-element";

class Demo extends React.Component {
    state={
        fullscreen: false
    }
    render(
        return(
            <div>

                <ReactFullScreenElement
                    fullScreen={this.state.fullscreen}
                    allowScrollbar={true}
                >
                <div>
                    <input type="button" value="Click here to toggle fullscreen" onClick={() => this.setState({fullscreen: !this.state.fullscreen})} />
                    your code goes here
                </div>
                    
                </ReactFullScreenElement>
            </div>

        )
    )


}