Universal Dropdown Menu Component For Vue

Description:

A universal dropdown menu component that can be attached to any element on the app.

How to use it:

1. Import the dropdown menu component.

import DropdownMenu from ‘@innologica/vue-dropdown-menu’

2. Bind a dropdown menu to an element as follows:

<dropdown-menu
  v-model="show"
>
  <button class="dropdown-toggle">
    Click Or Hover Me
  </button>
  <div slot="dropdown">
    <a class="dropdown-item" href="#">Menu Item 1</a>
    <a class="dropdown-item" href="#">Menu Item 2</a>
    <a class="dropdown-item" href="#">Menu Item 3</a>
    ...
  </div>
</dropdown-menu>

3. Default props.

// control the state of the dropdown
value: Boolean,
// show the dropdown menu on the right side
right: Boolean,
// display the dropdown menu on hover
hover: Boolean,
hover_time: {
  type: Number,
  default: 100
},
hover_timeout: {
  type: Number,
  default: 500
},
// custom styles
styles: {
  type: Object,
  default () {
    return {}
  }
},
// stay open until clicked outside
interactive: { 
  type: Boolean,
  default: false,
},
// transition effect
transition: {
  type: String,
  default: '',
}

Preview:

Universal Dropdown Menu Component For Vue

Download Details:

Author: Innologica

Live Demo: https://innologica.github.io/vue-dropdown-menu/#example

Download Link: https://github.com/Innologica/vue-dropdown-menu/archive/master.zip

Official Website: https://github.com/Innologica/vue-dropdown-menu

Install & Download:

# Yarn
$ yarn add @innologica/vue-dropdown-menu

# NPM
$ npm i @innologica/vue-dropdown-menu --save

You Might Be Interested In:

Tags:

Add Comment