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

menus

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

menus

Menus app using Electron

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

menus NPM version NPM downloads

A short-hand for you to build something like:

preview

Install

$ npm install --save menus

Usage

const Menus = require('menus')

const menus = new Menus()

menus.setMenu([
  {
    label: 'My First Menu Item',
    click() {
      console.log('clicked!')
    }
  }
])

menus.start()

menus.on('ready', () => {
  console.log('Menus app is ready!')
})

For a more complete example, please check out example.

API

new Menus([options])

const menus = new Menus()
options.icon

Path to tray icon.

options.showDockIcon

Default: false

Whether to show dock icon.

options.tooltip

Default: ''

The tooltip to show when tray icon is hovered.

menus.on('ready')

Emitted when a tray is created on the menubar.

menus.setMenu(menu)

Set context menu for the tray icon. The doc of menu is here.

menus.start()

Bootstrap the menus app.

menus.app

The electron.app instance.

menus.tray

The created tray instance.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT © EGOIST

Keywords

FAQs

Package last updated on 29 Sep 2016

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