A github desktop style title bar component for electron.
npm i --save electron-react-titlebar
You should have electron installed first.
electron app
import { TitleBar } from 'electron-react-titlebar'
import 'electron-react-titlebar/assets/style.css'
ReactDOM.render(
<TitleBar menu={menuTemplate} icon={iconPath} />,
document.querySelector('title-bar')
)
Disable minimize button
Disable maximize button
Path to icon file.
Menu template of Electron's Menu
Note: electron-react-titlebar is supporting a subset of Electron's MenuItem.
Supported options:
click
- supportedtype
-submenu
is not supported.label
- supportedenabled
- supportedvisible
- supportedchecked
- supported