Mica background for Electron apps
Electron has a built-in feature to add transparency effects to the window. However, this feature has some limitations:
- The transparency effect is only applied to the window frame, not to the window content.
- In order to apply the transparency effect to the whole window,
transparent
must be set totrue
in theBrowserWindow
options. This creates a number of bugs which prevents the window from being resized or maximized. (see this issue)
Electron Transparency aims to solve these issues by adding a native module which allows the transparency effect to be applied to the window content.
See the example app here
Install the module and electron-rebuild
npm install electron-transparency @electron/rebuild
Compile the native module
npx electron-rebuild