Remove menubar from Electron app

Sean Letendre picture Sean Letendre · Aug 23, 2016 · Viewed 99.8k times · Source

How do I remove this menu-bar from my electron apps:

menu-bar

Also it says "Hello World"(is this because I downloaded electron pre-built, and will go away once I package the application?). I didn't code these into the html, so I don't know how to get it out!-

Answer

Tony Vincent picture Tony Vincent · Aug 23, 2016

You can use w.setMenu(null) or set frame: false (this also removes buttons for close, minimize and maximize options) on your window. See setMenu() or BrowserWindow(). Also check this thread


Electron now has win.removeMenu() (added in v5.0.0), to remove application menus instead of using win.setMenu(null).


Electron 7.1.x seems to have a bug where win.removeMenu() doesn't work. The only workaround is to use Menu.setApplicationMenu(null)