Skip to main content

Borderless Mode in Progressive Web Apps (PWAs)

Are you tired of the traditional title bar in apps? Do you wish for more freedom in how you display your apps? If so, you're not alone! Many developers are looking for ways to break free from the constraints of the traditional title bar. One innovative new concept that's gaining traction is borderless mode. Borderless mode removes the title bar altogether, giving developers more flexibility in how they design their apps. This could lead to a whole new era in app aesthetics and functionality. Whether you're a developer or just curious about the future of web applications, this post is for you!

Title Bars in Web Apps: A Necessary Evil?

Have you ever used a web app? If so, you've probably seen the title bar—that bar at the top of the app window that has buttons and info. Until now, all web app display modes have required this title bar in one form or another. While the title bar is useful, it can sometimes restrict the creative freedom of app developers and might not provide the flexibility required for certain use cases.

Imagine an app that wants to fully customize its title bar, or even remove it entirely, to provide a more immersive user experience. Or maybe a Virtual Desktop Infrastructure (VDI) provider wants to stream an app without having to deal with the additional layer of a local title bar over the remote one. This is where the idea of "borderless mode" comes in.

Embracing the Borderless Mode

So what exactly is this "borderless mode"? It's a concept that completely removes the title bar and replaces it with web content, giving developers full control over its look and feel. This might sound a bit abstract, but imagine an app you're familiar with, like Steam, without its standard title bar but with a customized version instead. Or consider a splash screen for a game that takes up your entire screen without any sign of a title bar—these are examples of what borderless mode can offer.

Making Borderless Mode a Reality

Here's where it gets a bit technical, but bear with us. Implementing a borderless mode involves several steps:

Display Override Option: Developers can specify their wish to remove the title bar in their web app's manifest file by using a new "borderless" option.

Enabling Draggable Regions: In a borderless mode, the areas of the app that can be dragged to move the window around (which traditionally reside in the title bar) will need to be defined by the app itself.

CSS Display-mode Media Query: To make the transition to borderless mode smoother, CSS media queries can be used to adjust the style and layout of the app depending on the display mode.

Window Management Permission: To activate the borderless mode, the app will need the appropriate permissions, which can be requested and managed via JavaScript. This ensures the user's control over the feature's availability.

Isolated Web Apps Check: This feature is designed to work specifically with Isolated Web Apps (IWAs), a type of web app that runs in its own separate process for improved security and performance.

Addressing Potential Challenges

Borderless mode is a new innovation that has the potential to revolutionize the way we use our computers. However, like any new technology, it also comes with some challenges. One of the biggest challenges is how to display important information like the app's origin and privacy indicators. Traditionally, this information is displayed in the title bar, but with borderless mode, the title bar is gone. This means that developers need to find new ways to display this information.

One possible solution is to use floating windows. Floating windows are small windows that can be placed anywhere on the screen. This would allow developers to display the app's origin and privacy indicators in a way that is still visible and accessible.

Borderless mode a promising new technology, but it does come with some challenges. Developers will need to find creative solutions to these challenges in order to make borderless mode a truly successful innovation.

Closing Thoughts

Borderless mode is a revolutionary new development in the realm of web applications. By providing developers with more flexibility in shaping their app's aesthetics, borderless mode has the potential to revolutionize web app design. This flexibility could lead to more engaging and immersive user experiences. For example, developers could use borderless mode to create apps that fill the entire screen, or to create apps that have a more fluid and dynamic user interface. The possibilities are endless.