1.0.7 • Published 1 year ago

electron-windows-titlebar v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

electron-windows-titlebar


NPM version CI node version npm download

windows-style title bar component for Electron

Native Addon Demo

Web API Demo

Contributors

xudafengsriting

This project follows the git-contributor spec, auto updated at Wed Oct 19 2022 20:43:02 GMT+0800.

Installment

npm i electron-windows-titlebar --save-dev

Use Native Addons

const windowTitleBar = require('electron-windows-titlebar');
const win = new BrowserWindow({
  width: 800,
  height: 600,
  title: 'addon demo',
})
const hwnd = win?.getNativeWindowHandle();
const setDark = true;
if (hwnd) {
  setDark ? windowTitleBar.switchDarkMode(hwnd) : windowTitleBar.switchLightMode(hwnd);
}

Use Web APIs

// renderer process: import electron-windows-titlebar renderer
import TitleBar from 'electron-windows-titlebar/TitleBar';

<TitleBar
/>

Run Demo

npm run dev:web

another shell

npm run dev:main

License

The MIT License (MIT)

1.0.1

1 year ago

1.0.0

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago