Transparent title bar with native title label in Electron for Mac
Using transparent-titlebar | titleBarStyle: hidden in Electron | Normal |
---|---|---|
npm install transparent-titlebar
TypeScript definitions are included.
let win: BrowserWindow
const transparentTitlebar = require('transparent-titlebar')
// Setup window to use transparent titlebar
transparentTitlebar.setup(win.getNativeWindowHandle())
// Set title color (must be called on page load and whenever the title has changed)
transparentTitlebar.setColor(win.getNativeWindowHandle(), 1, 0, 0, 1)
cd examples
npm install
npm start