@electron-boilerplate/titlebar
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

@electron-boilerplate/titlebar

Renders color titlebars in Electron on Windows and optionally on macOS

windows example

mac example

Usage

This library is primarily designed for use with electron-boilerplate which simplifies running code across the Electron main and renderer processes.

npm install electron-boilerplate @electron-boilerplate/titlebar

In your main process simply:

const { ElectronBoilerplate } = require('electron-boilerplate');
const { customTitlebar } = require('@electron-boilerplate/titlebar');

ElectronBoilerplate
  .standardConfiguration()
  .use(customTitlebar('darkblue'))
  .run();

customTitlebar parameters

Parameter Type Description Default
color string Titlebar background color '#3f51b5'
colorBarOnMac boolean Also custom draw a colored titlebar on macOS true
showTitle boolean Display the page title in the titlebar true
appendTo string Query selector used to find element to insert titlebar into. If undefined (the default), then a flex layout is automatically added for you undefined (auto add flex layout)

Readme

Keywords

none

Package Sidebar

Install

npm i @electron-boilerplate/titlebar

Weekly Downloads

1

Version

1.2.1

License

MIT

Unpacked Size

42.9 kB

Total Files

6

Last publish

Collaborators

  • timfish