Skip to content

Menu

EMenu is a key feature in web development, it provides a handy means of presenting users with a list of choices. They appear at the position the element that generates them. Demo Here

Usage

vue

<template>
  <EMenu color="primary">
    <template #text>Drop down menu</template>
    <ul>
      <li>Action 1</li>
      <li>Action 2</li>
    </ul>
  </EMenu>
</template>

Props

For EMenu component, the following props are available:

PropTypeDefaultNote
widthString-Sets the component's width.
heightString-Sets the component's height.
disabledBooleanfalseDisables the menu.
roundedBooleanfalseIt creates a circular menu.
squareBooleanfalseRemoves rounded corners of the element.
modelValueBooleanfalseControls the open state of menu.
contentClassesString-Classes for default slot container.
closeOnContentClickBooleanfalseIt closes the menu on content click.
sizeString"md"The EMenu element has three predefined sizes: sm, md, lg.
customColorString-A custom color in rgb format is applied to the menu (e.g, customColor="101, 89, 204").
positionString"bottom"The position prop allows the menu to be offset relative to the activator.The element can appear from the left, right,top or bottom edge of the parent.
colorString"primary"The given color is applied to the menu - utility colors are supported (e.g primary or danger). you'll find a list of built-in classes on the src/styles/_vars.scsspage.
arrowIcon[Boolean, Object]trueBy using this prop you can hide/display the arrow icon of the menu title or you can change it. More Info about icons here.
iconObject-By using icon prop the EMenu element will be visualized with an Icon.The icon appears before the default slot. More Info about icons here.
iconBtnObject-By using iconBtn prop the EMenu element will be visualized in an Icon form. More Info about icons here.
variantString"fill"The EMenu element can be represented in two ways: fill, alternate, outline ,text. alternate displays the menu with a light background, outline draws a border around an element and text displays the menu with only text and no background color.
animationString"expand"The EMenu element can be animated in many ways: Defined animations here.
animationOriginString"origin-center"Defines the animation origin, values: Tailwind css classes for origin

Slots

The EMenu component provides following slots that enable you to customize the content.

SlotDescription
textSlot for the component's title.
defaultThe default Vue slot.

COPYRIGHT