Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

preact-fullscreen

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preact-fullscreen

Component that performs fullscreen in DOM Elements

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Preact FullScreen

npm versionLicense: MITBuild StatusDependencies

Component that performs fullscreen in DOM Elements

Installation

npm i preact-fullscreen
// OR
yarn add preact-fullscreen

Demo

Local demo:

git clone https://github.com/andrelmlins/preact-fullscreen.git
cd preact-fullscreen
yarn install && yarn start

Examples

import { h, render } from "preact";
import PreactFullscreeen from "preact-ullscreen";

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

render(<App />, document.body);

Properties

PropTypeDescription
onChangefuncCall in change
onErrorfuncCall in error

Children Function Properties

PropTypeDescription
refobjectRef dom element
onTogglefuncCall for fullscreen toggle
onExitfuncCall for fullscreen exit
onRequestfuncCall for fullscreen enter

NPM Statistics

Download stats for this NPM package

NPM

License

Preact FullScreen is open source software licensed as MIT.

Keywords

FAQs

Package last updated on 25 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc