GitPedia

Be full

πŸ›° ζ΅θ§ˆε™¨ε…¨ε± / full screen

From any86Β·Updated May 9, 2026Β·View on GitHubΒ·

[npm-image]: https://badgen.net/npm/v/be-full [npm-url]: https://npmjs.org/package/be-full [size-image]: https://badgen.net/bundlephobia/minzip/be-full [size-url]: https://bundlephobia.com/result?p=be-full The project is written primarily in TypeScript, distributed under the MIT License license, first published in 2019. Key topics include: full, javascript, request-full-screen, requestfullscreen, typescript.

be-full NPM Version Size

Full screen display, support PC/mobile, less than 1kb. :rocket:Online demo

Language

δΈ­ζ–‡ | English

Install

shell
npm i -S be-full

⚑ quick start

web page full screen
javascript
import {beFull} from 'be-full'; beFull();
element fullscreen
javascript
const el = document.getElementById('video'); beFull(el);

set css property ":fullscreen"

If there is a "black" gap (or other colors) when the element is full screen, the second parameter can be set to the specified color.

javascript
const el = document.getElementById("video"); beFull(el, "#fff");

Note: After executing "exitFull" or "toggleFull", the setting of ":fullscreen" will be automatically canceled.

πŸ”₯ API

exitFull(Exit Full Screen)
javascript
exitFull();
toggleFull (toggle full screen/exit)

The method of use is the same as beFull, except that the second click will execute exitFull

javascript
toggleFull(); // Switch the specified element to full screen/exit toggleFull(document.getElementById('video'));
isFull (whether the element is full screen)
javascript
isFull(document.getElementById('video')); // true or false

Contributors

Showing top 2 contributors by commit count.

View all contributors on GitHub β†’

This article is auto-generated from any86/be-full via the GitHub API.Last fetched: 6/19/2026