react-titlebar-osx
v1.1.0
Published
osx controls to use on electron with react
Downloads
12
Maintainers
Readme
react-titlebar-osx
Emulate OS X window titlebar using ES6 and React. Extracted from kapetan/titlebar.
demo
npm run demo-dev
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
(defaultfalse
): Enable dragging.transparent
(defaultfalse
): 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.