Usage

<dropdown-menu>
  <template #trigger>
    <button>Open Dropdown</button>
  </template>
  
  <template #header> Dropdown Header </template>
  
  <template #body>
    <ul>
      <li v-for="i in 6" :key="i">
        <a href="">Item {{ i }}</a>
      </li>
    </ul>
  </template>
  
  <template #footer> Dropdown Footer </template>
</dropdown-menu>

Props

NameDescriptionTypeOptionsDefault
isOpenShow or hide for dropdownBooleantrue , falsefalse
modeOpen variantStringclick , hoverclick
dropupOpen the menu upwardsBooleantrue , falsefalse
directionMenu container directionStringleft , right , centerleft
closeOnClickOutsidecloses dropdown menu when click outsideBooelantrue , falsetrue
withDropdownCloserIf there is an element in the menu with dropdown-closer attribute, clicking on it closes the menu.Booleantrue , falsefalse
containerZIndexz-index of menu containerString.994
overlaybackground overlay of dropdown menu (only for click mode)Booleantrue , falsetrue
overlayBgColorbackground-color of overlayStringex: rgba(1, 35, 83, 0.8)rgba(0, 0, 0, 0.2)
overlayZIndexz-index of overlayString.992
transitioncustom vue transition for menuString.default

Slots

NameDescription
triggertrigger for dropdown menu
headerheader of menu container (optional)
bodycontent of menu (optional)
footerfooter of menu container (optional)

Events (only for click mode)

@opened="dispatchEvent"
@closed="dispatchEvent"