Skip to content

santomegonzalo/react-titlebar-macos

Repository files navigation

react-titlebar-osx

Emulate OS X window titlebar using ES6 and React. Extracted from kapetan/titlebar.

demo

npm run demo-dev

how looks

Example how looks

how to use it

npm install --save react-titlebar-osx
import { Titlebar } from 'react-titlebar-osx';
<Titlebar
   text="Awesome tool"
   draggable={true}
   onClose={() => this.handleClose()}
   onMaximize={() => this.handleMaximize()}
   onFullscreen={() => this.handleFullscreen()}
   onMinimize={() => this.handleMinimize()}
/>

props

  • draggable (default false): Enable dragging.
  • transparent (default false): Transparent background.
  • text: Enable centered text.
  • padding: Add more space to the top and bottom.
  • onClose: (required) called when close is clicked.
  • onMinimize: (required) called when minimized is clicked.
  • onMaximize: (required) called when maximize is clicked.
  • onFullscreen: (required) called when fullscreen is clicked.

About

Custom title bar for electron using React

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages