electron-badge

0.3.2 • Public • Published

electron-badge

NPM version NPM monthly download

Electron badge works well for Windows

Installation

$ yarn add electron-badge

Usage

// main.js
 
const Badge = require('electron-badge');
 
function createWindow() {
  win = new BrowserWindow({width: 800, height: 600});
  const badgeOptions = {};
  new Badge(win, badgeOptions);
}
// index.html
ipcRenderer.send('update-badge', 5, {background: 'crimson'});
 
// To remove badge
ipcRenderer.send('update-badge', 0); // or null

API

Badge options(Windows only)

Option Name Default Value
color white
backaground red
fontSize 12px
fontFamily Arial
fontWeight bold
max 99

License

MIT © Nghiep

Readme

Keywords

Package Sidebar

Install

npm i electron-badge

Weekly Downloads

4

Version

0.3.2

License

MIT

Unpacked Size

6.69 kB

Total Files

7

Last publish

Collaborators

  • tronghiep92