Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
electron Floating Window
let floatingWindow;
const createFloatingWindow = function() {
const electron = require('electron');
const BrowserWindow = electron.BrowserWindow;
if (!floatingWindow) {
floatingWindow = new BrowserWindow({
width: 1000,
height: 80,
titleBarStyle: 'hide',
transparent: true,
frame: false,
resizable: false,
hasShadow: false,
// opacity: 0.5,
floatingWindow.setAlwaysOnTop(true, 'floating');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment