Emulate OS X window titlebar using ES6 and React. Extracted from kapetan/titlebar.
npm run demo-dev
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()}
/>
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.