Screenfull is a lightweight JavaScript library that provides a simple wrapper for cross-browser usage of the Fullscreen API.
The library solves the problem of browser inconsistencies when implementing fullscreen functionality. Rather than writing vendor-specific code to handle different browser implementations of the Fullscreen API, developers can use Screenfull's unified interface. The tool abstracts away these differences, exposing methods like request, exit, and toggle that work consistently across supported browsers. It also provides event listeners for detecting fullscreen changes and errors, and properties to check fullscreen status and the currently fullscreened element.
Screenfull suits any web project that needs fullscreen functionality without the overhead of handling browser compatibility manually. The library is particularly valuable for applications targeting multiple browsers, as it eliminates the need to write conditional code for vendor prefixes and API variations. The tool is feature complete and intentionally accepts no new features, making it a stable, focused solution. It is not supported on iPhone due to browser limitations rather than library constraints. Projects that require ESM modules and can target modern browsers should use the current version; older projects without ESM support can use an earlier version.
The project maintains a minimal footprint at 0.7 kB gzipped and is available through standard package managers and CDN distribution. Development activity shows the maintainer has established the library as feature complete and stable, with no new features being accepted going forward.