Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

electron-react-titlebar

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-react-titlebar

A github desktop style title bar component for electron.

  • 1.0.0-beta.4
  • beta
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
201
increased by16.86%
Maintainers
1
Weekly downloads
 
Created
Source

electron-react-titlebar

A github desktop style title bar component for electron.

screenshot

Installation

npm i --save electron-react-titlebar

Example

You should have electron installed first.

electron app

Usage

If you are using webpack

import { TitleBar } from 'electron-react-titlebar'
import 'electron-react-titlebar/assets/style.css'

ReactDOM.render(
    <TitleBar menu={menuTemplate} icon={iconPath} />,
    document.querySelector('title-bar')
)

If you're not a webpack user and wants to load css directly

ReactDOM.render(
    <TitleBar menu={menuTemplate} icon={iconPath}>
      <link rel="stylesheet" type="text/css" href={require.resolve('electron-react-titlebar/assets/style.css')} />
    </TitleBar>,
    document.body
)

Options

children?: node

Elements to be rendered in between the menu and the window controls (optional).

disableMinimize?: boolean

Disable minimize button (optional).

disableMaximize?: boolean

Disable maximize button (optional).

icon?: string

Path to icon file (optional).

currentWindow?: <BrowserWindow>

The browserWindow Object that window controls affect to. Default value is remote.currentWindow() (optional).

menu?: <MenuTemplate>

Menu template of Electron's Menu (optional).

Note: electron-react-titlebar is supporting a subset of Electron's MenuItem.

Supported options:

  • click - supported
  • type - submenu is not supported.
  • label - supported
  • enabled - supported
  • visible - supported
  • checked - supported

Keywords

FAQs

Package last updated on 03 Oct 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc