ajbeaven / electron-react-titlebar

A github desktop style title bar component for electron.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

electron-react-titlebar

A github desktop style title bar component for electron.

screenshot

Installation

npm i --save electron-react-titlebar

Example

You should have electron installed first.

electron app

Usage

import { TitleBar } from 'electron-react-titlebar'
import 'electron-react-titlebar/assets/style.css'

ReactDOM.render(
    <TitleBar menu={menuTemplate} icon={iconPath} />,
    document.querySelector('title-bar')
)

Options

disableMinimize

Disable minimize button

disableMaximize

Disable maximize button

icon

Path to icon file.

menu

Menu template of Electron's Menu

Note: electron-react-titlebar is supporting a subset of Electron's MenuItem.

Supported options:

  • click - supported
  • type - submenu is not supported.
  • label - supported
  • enabled - supported
  • visible - supported
  • checked - supported

About

A github desktop style title bar component for electron.

License:MIT License


Languages

Language:JavaScript 74.8%Language:CSS 24.8%Language:HTML 0.5%