Limited availability
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The Window Controls Overlay API gives Progressive Web Apps installed on desktop operating systems the ability to hide the default window title bar and display their own content over the full surface area of the app window, turning the control buttons (maximize, minimize, and close) into an overlay.
Opting-in to the featureBefore using this feature, the following conditions must be true:
display_override
member must be set to window-controls-overlay
.Progressive Web Apps installed on desktop devices can be displayed in standalone app windows, just like native apps. Here is what an application window looks like:
As seen above, the app window is made of two main areas:
The title bar area contains the system-critical maximize, minimize, and close buttons (their position may vary across operating systems), the name of the application (which comes from the <title>
HTML element in the page), and possibly user-agent-specific PWA buttons.
With the Window Controls Overlay feature, Progressive Web Apps can display their web content over the whole app window surface area. Because the window control buttons and user-agent-specific PWA buttons must remain visible, they get turned into an overlay displayed on top of the web content.
The part of the title bar that normally contains the application name is hidden, and the area that it normally occupies becomes available via the Window Controls Overlay API.
PWAs can use the API to position content in this area, and avoid having content hidden behind the control buttons overlay, similar to how web authors can account for the presence of notches on certain mobile devices.
CSS environment variablesProgressive Web Apps can position their web content in the area that the title bar normally occupies by using the titlebar-area-x
, titlebar-area-y
, titlebar-area-width
, and titlebar-area-height
CSS environment variables. See Using env() to ensure content is not obscured by window control buttons in desktop PWAs.
WindowControlsOverlay
Experimental
Provides information about the visibility and geometry of the title bar and an event to know whenever it changes.
WindowControlsOverlayGeometryChangeEvent
Experimental
Represents events providing information related to the desktop Progress Web App's title var region when its size or visibility changes.
Navigator.windowControlsOverlay
Returns the WindowControlsOverlay
interface, which exposes information about the title bar geometry in desktop Progressive Web Apps.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4