<c-menu><c-menu-buttonright-icon="chevron-down">
Actions
</c-menu-button><c-menu-list><c-menu-item>Download</c-menu-item><c-menu-item>Create a Copy</c-menu-item><c-menu-item>Mark as Draft</c-menu-item><c-menu-item>Delete</c-menu-item><c-menu-itemas="a"href="#">
Attend a Workshop
</c-menu-item></c-menu-list></c-menu>
To access the internal state of the CMenu, you can use the default scoped slot to access the isOpen value of
the Menu component. isOpen reflects the current open or closed state of the CMenu component.
Editable Example
<template><c-menuv-slot="{ isOpen }"><c-menu-button:is-active="isOpen":right-icon="isOpen ? 'chevron-up' : 'chevron-down'">
{{ isOpen ? 'Close' : 'Open' }}
</c-menu-button><c-menu-list><c-menu-item@click="alert('Kage bushin no jutsu!!! 💨👯👯👯👯💨')">
Copy to clipboard
</c-menu-item><c-menu-item@click="alert('Katon! Gou ka kyuu no jutsu!!! 🔥')">
Burn to disc
</c-menu-item></c-menu-list></c-menu></template><script>exportdefault{methods:{alert(value){returnalert(value)}}}</script>
When focus is on the CMenuButton or within the CMenuList and you type a letter
key, a search begins. Focus will move to the first CMenuItem that starts with
the letter you typed.
Open the menu, try and type any letter, say "S" to see the focus movement.
<c-menu><c-menu-buttonas="button"right-icon="chevron-down">
Your Cats
</c-menu-button><c-menu-list><c-menu-itemh="48px"><c-imagesize="2rem"rounded="full"src="https://placekitten.com/100/100"alt="Fluffybuns the destroyer"mr="12px"/><span>Fluffybuns the Destroyer</span></c-menu-item><c-menu-itemh="40px"><c-imagesize="2rem"rounded="full"src="https://placekitten.com/120/120"alt="Simon the pensive"mr="12px"/><span>Simon the pensive</span></c-menu-item></c-menu-list></c-menu>
You can compose a menu for table headers to help with sorting and filtering
options. Use the CMenuOptionGroup and CMenuItemOption components.
Order
Country
Editable Example
<c-menu:close-on-select="false"><c-menu-buttonvariant-color="blue">
Menu Item
</c-menu-button><c-menu-listmin-width="240px"><c-menu-option-groupdefault-value="asc"title="Order"type="radio"><c-menu-item-optionvalue="asc">Ascending</c-menu-item-option><c-menu-item-optionvalue="desc">Descending</c-menu-item-option></c-menu-option-group><c-menu-divider/><c-menu-option-grouptitle="Country"type="checkbox"><c-menu-item-optionvalue="email">Email</c-menu-item-option><c-menu-item-optionvalue="phone">Phone</c-menu-item-option><c-menu-item-optionvalue="country">Country</c-menu-item-option></c-menu-option-group></c-menu-list></c-menu>