sidneys / electron-titlebar-windows

Adds the Windows 10 ModernUI (Metro)-style titlebars to any Electron-based desktop app.
MIT License
140 stars 23 forks source link

electron-titlebar-windows

Adds CSS-based Windows 10 Modern UI title bars to any Electron-based desktop app.

screen

Installation

$ npm install --save electron-titlebar-windows

API

Importing the module

const ElectronTitlebarWindows = require('electron-titlebar-windows');

Creating a new instance

The module takes a single optional options argument and exports the TitleBar class:

const titlebar = new ElectronTitlebarWindows(options);

Properties of options:

Methods

appendTo

Shows the Title Bar.

titlebar.appendTo(contextElement);

destroy

Removes the Title Bar.

titlebar.destroy();

Events

TitleBar emits the following events:

titlebar.on('close', function(e) {
    console.log('close');
});

License

MIT © sidneys

Related

Based on titlebar