Socket
Socket
Sign inDemoInstall

electron-titlebar-windows

Package Overview
Dependencies
159
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    electron-titlebar-windows

Add Windows 10-style Modern UI titlebars to Electron-based desktop applications


Version published
Weekly downloads
20
decreased by-23.08%
Maintainers
1
Install size
18.0 MB
Created
Weekly downloads
 

Readme

Source

electron-titlebar-windows Build Status

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:

  • (optional) darkMode - String - Light titlebar buttons (for dark backgrounds)
  • (optional) color - String - Icon color (Hex)
  • (optional) backgroundColor - String - Bar color (Hex)
  • (optional) draggable - Boolean - Titlebar enables dragging of contained window
  • (optional) fullscreen - Boolean - Resize button initializes in fullscreen mode

Methods

#appendTo

Shows the Title Bar.

titlebar.appendTo(contextElement);
  • (optional) contextElement - HTMLElement - Default: document.body - Element to which to add the titlebar
#destroy

Removes the Title Bar.

titlebar.destroy();

Events

TitleBar emits the following events:

  • minimize
  • maximize
  • fullscreen
  • close
titlebar.on('close', function(e) {
    console.log('close');
});

License

MIT © sidneys

Based on titlebar

Keywords

FAQs

Last updated on 07 Aug 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc