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

@irfanismail/mon-dropdown

v1.0.2

Published

MonDropdown a feature-rich dropdown Vue2 component. It focuses on bringing the best of Vue's features to achieve common & advanced behavior patterns while giving you the freedom to style the component to your liking. Built-to-work with TailwindCSS.

Downloads

3

Readme

mon-dropdown

MonDropdown a feature-rich dropdown Vue2 component. It focuses on bringing the best of Vue's features to achieve common & advanced behavior patterns while giving you the freedom to style the component to your liking. Built-to-work with TailwindCSS.

mon-dropdown-gif

Demo

Getting Started

// npm
npm i @irfanismail/mon-dropdown

// yarn
yarn add @irfanismail/mon-dropdown

Usage

  1. Table of Props

| Props | Type | Default | | ------------- |------------- | :-----------------: | | label | string | | | labelClass | string | | | contentClass | string | 'mon-dropdown-content' | | enterActiveClass | string | 'mon-dropdown-enter-active' | | enterClass | string | 'mon-dropdown-enter' | | enterToClass | string | 'mon-dropdown-enter-to | | leaveActiveClass | string | 'mon-dropdown-leave-active' | | leaveClass | string | 'mon-dropdown-leave' | | leaveToClass | string | 'mon-dropdown-leave-to' | | anchor | boolean | false | | dropUp | boolean | false | | persistent | boolean | false | | disableClickAway | boolean | false | | disableEsc | boolean | false | | openOnMount | boolean | false |

  1. Combinations of Slots & Props
<!-- Basic Dropdown -->
props: 
* label
* labelClass
* anchor
* dropUp
* persistent
* disableClickAway
* disableEsc
* openOnMount 
  <mon-dropdown [...props]>
      <template #content="{ close, toggle }">...</template>
  </mon-dropdown>
  
<!-- Custom Trigger -->
props: 
* anchor
* dropUp
* persistent
* disableClickAway
* disableEsc
* openOnMount 

  <mon-dropdown [...props]>
    <template #trigger="{ toggle, open }">...</template>
    <template #content="{ toggle, close }">...</template>
  </mon-dropdown>
  
  1. Lifecycle Hooks

| Hooks | Type | | ------------- |------------- | | before-open | function | | after-open | function | | before-close | function | | after-close | function |

Check the Demo on how to use dropdown lifecycle hooks

  1. Handling Dropdown Behavior outside Usual Scope

There will be times, you will find yourselves needing to trigger dropdown behaviors outside of the normal scope (eg. clicking a button). MonDropdown provides three (3) internal functions that can be accessed through Vue's ref="..." & $refs.

The three (3) functions are:

  • toggleDropdown()
  • openDropdown()
  • closeDropdown()

Check the Demo on how to use dropdown's internal functions

License

MIT License

Contact

Irfan Ismail - @irfancoder - [email protected]