Skip to main content

Menu

Props

AttributeDescriptionTypeDefault
activeColorGives color to the elements selected in the menu.stringPrimary
autoCollapseCollapse previous selection automatically.booleanfalse
classmenuConfigure the active CSS class applied when the link is active.string-
collapseOnItemSelectOpening and closing the menu so that the items in the menu can be selected.booleanfalse
colorApplies specified color to the control.string'primary'
disabledDisables the menu. Removes the ability to click or target the component.booleanfalse
fixedApplies position: fixed to the component.booleanfalse
hideMenuTitleHides the title of the menu. As soon as the menu opens, it only shows the icons of the menu.booleanfalse
menuDataData of component.array-
miniVariantWidthDesignates the width assigned when the mini prop is turned on.string56
showOnlyIconHides the title of the menu.booleanfalse
titleTitle of component.string'Menu'
widthSets the width for the component.string256

Events

AttributeDescription
click:rowTriggers when clicked on the row item.
update:mini-variantChanges the appearance of the menu to mini or expanded.

Component Samples

[{ menuItem = true, code = 'Vasıta', imagePath = 'mdi-car',tooltip= true, children = [{menuItem = true, imagePath = 'mdi-star', code = 'Otomobil',tooltip = false, children = [{ menuItem = true, imagePath = 'mdi-star',code = 'BMW',tooltip = true, children = [{ menuItem = true, imagePath = 'mdi-star', code = '5.20', tooltip = false}]}]}] }]

AttributeDescriptionType
menuItemVisibility information in the menuBoolean
codeWhat to write in the menuString
imagePathIcon of data (using 'materialdesignicons' to icon set) or ImagesString
tooltipDisplaying tooltip on menu nameBoolean
optionsIcons or images are given a size and coloriconOptinons or imageOptions
childrenSub-items of dataArray

Using imagepath for image

imagePath= Url.resolve({url='/static/images/cekmatiknew.png'})

Using imagepath for icon

imagePath='mdi-menu'

options Usage

options = {
iconOptions?: { size?: string | number; xSmall?: boolean; small?: boolean; large?: boolean; xLarge?: boolean; color?: string },
imageOptions?: { width?: string | number; height?: string | number }};

Color

image image

Fixed

image image

Title

image image

Get menuData From Service and Apply Localization

QMenuExample

Using options in the menuData prop in Menu

Qmenu-Icon-Img-SizeandColor