Categories
JavaScript Answers

How to remove menu bar from Electron app?

Spread the love

Sometimes, we want to remove menu bar from Electron app.

In this article, we’ll look at how to remove menu bar from Electron app.

How to remove menu bar from Electron app?

To remove menu bar from Electron app, we can set the autoHideMenuBar to true.

For instance, we write

const mainWindow = new BrowserWindow({
  autoHideMenuBar: true,
})

to create a BrowserWindow instance by passing in an object with autoHideMenuBar set to true.

As a result, the menu bar would be hidden in the app.

Conclusion

To remove menu bar from Electron app, we can set the autoHideMenuBar to true.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *