@backrunner/vue-titlebar

1.3.0 • Public • Published

vue-titlebar

This is a fork version of wuild's vue-titlebar.

Here's the difference:

  1. Change menu to a slot.
  2. Bundled with rollup.
  3. Icon will not show by default and change default icon to electron.
  4. Add lint to the project.
  5. Add restore button and related event.

Installation

Install with npm:

npm install --save @backrunner/vue-titlebar
const VueTitlebar = require('@wuild/vue-titlebar');

Vue.use(VueTitlebar);

Usage

Themes / Platform

windows dark

windows light

osx dark

osx light

Properties

Name type default description
theme String light theme (dark, light)
platform String -- (required) specify current platform (win32, darwin, linux)
isMinimizable Boolean true show minimize button
isMaximizable Boolean true show maximize button
isMaximized Boolean true if window is maximized
isClosable Boolean true show close button
onMinimize Function -- if minimize button is clicked
onMaximize Function -- if maximize button is clicked
onRestore Function -- if restore button is clicked
onClose Function -- if close button is clicked
showIcon Boolean false theme (dark, light)
showTitle Boolean true theme (dark, light)

Example

full example

<v-titlebar
  :theme="theme"
  :platform="platform"
  :on-close="close"
  :on-maximize="maximize"
  :on-restore="restore"
  :on-minimize="minimize"
  :is-maximizable="isMaximizable"
  :is-maximized="isMaximized"
  :is-closable="isClosable"
  :is-minimizable="isMinimizable"
  :show-icon="showIcon"
  :show-title="showTitle"
>
  <template slot="icon">
    <img src="image.png" alt="icon" />
  </template>
  <template slot="title">
    App Name
  </template>
</v-titlebar>

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @backrunner/vue-titlebar

Weekly Downloads

1

Version

1.3.0

License

MIT

Unpacked Size

16.7 kB

Total Files

4

Last publish

Collaborators

  • backrunner