npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

blooming-menu

v1.1.1

Published

A configurable and animated radial menu for the web

Downloads

52

Readme

blooming-menu

A configurable and animated radial menu. BloomingMenu is a port of AwesomeMenu for the web.

Preview

Install

You can install through npm and use browserify to make it run on the browser.

npm install --save blooming-menu

Or just download the minified version here.

Usage

Create a new BloomingMenu object:

var menu = new BloomingMenu({
  itemsNum: 8
})

Render it:

menu.render()

And now you can attach event listeners to the items of the menu, just like a regular DOM element.

menu.props.elements.items.forEach(function (item, index) {
  item.addEventListener('click', function () {
    console.log('Item #' + index + 'was clicked')
  })
})

API

constructor new BloomingMenu(opts)

Options object passed on instantiation time, e.g.:

var menu = new BloomingMenu({
  startAngle: 60,
  endAngle: 0
})
  • opts.itemsNum
    • Type: Number
    • Required: true
  • opts.startAngle
    • Type: Number
    • Default: 90
  • opts.endAngle
    • Type: Number
    • Default: 0
  • opts.radius
    • Type: Number
    • Default: 80
  • opts.itemAnimationDelay
    • Type: Number
    • Default: 0.04
  • opts.animationDuration
    • Type: Number
    • Default: 0.4
  • opts.fatherElement
    • Type: HTMLElement
    • Default: document.body
  • opts.itemWidth
    • Type: Number
    • Default: 50
  • opts.CSSClassPrefix
    • Type: String
    • Default: 'blooming-menu__'
  • opts.mainContent
    • Type: String
    • Default: '+'
  • opts.injectBaseCSS
    • Type: Boolean
    • Default: true

Every method below is an instance method.

obj.render

Attachs the instance to the DOM and binds all event listeners.

obj.remove

Removes all DOM elements and event listeners.

obj.open

Opens the menu programmatically.

obj.close

Closes the menu programmatically.

obj.selectItem(num)

Select programatically the num item of the menu.

Support

Chrome | Firefox | IE | Opera | Safari --- | --- | --- | --- | --- | Latest ✔ | Latest ✔ | 9+ ✔ | Latest ✔ | 8.0+ ✔ |

Donating

If you found this library useful and are willing to donate, transfer some bitcoins to 1BqqKiZA8Tq43CdukdBEwCdDD42jxuX9UY or through the URL https://www.coinbase.com/caiogondim

Or via PayPal.me https://www.paypal.me/caiogondim.

Credits


caiogondim.com  ·  GitHub @caiogondim  ·  Twitter @caio_gondim