Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/seanchas116/transparent-titlebar

Transparent title bar with native title label in Electron for Mac
https://github.com/seanchas116/transparent-titlebar

electron macos titlebar

Last synced: 4 days ago
JSON representation

Transparent title bar with native title label in Electron for Mac

Awesome Lists containing this project

README

        

# transparent-titlebar

Transparent title bar with native title label in Electron for Mac

![Example](images/example.gif)

|Using transparent-titlebar|titleBarStyle: hidden in Electron|Normal|
|-|-|-|
| ![Using transparent-titlebar](images/transparent.png) | ![titleBarStyle: hidden](images/titlebarstyle-hidden.png) | ![Normal](images/normal.png) |

## Install

```
npm install transparent-titlebar
```

TypeScript definitions are included.

## Use

```js
let win: BrowserWindow
const transparentTitlebar = require('transparent-titlebar')

// Setup window to use transparent titlebar
transparentTitlebar.setup(win.getNativeWindowHandle())

// Set title color (must be called on page load and whenever the title has changed)
transparentTitlebar.setColor(win.getNativeWindowHandle(), 1, 0, 0, 1)
```

## Run Example

```
cd examples
npm install
npm start
```