Appearance
DropdownMenu
Dropdownmenu is a container (dropdown alias) for menu elements.
Props
hide
Decides whether to hide the menu
type:
Boolean
default:
false
Slots
trigger
Slot for the menu start button
content
Menu elements slot
Events
hide-floating
Providing information about closure
Examples
Dropdown menu
html
<dropdown-menu>
<template #trigger>
<btn color="primary" text="Button" />
</template>
<template #content>
test
</template>
</dropdown-menu>
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Dropdown menu with closing props
html
<dropdown-menu :hide="show" @hide-floating="show = false">
<template #trigger>
<btn color="primary" text="Button" />
</template>
<template #content>
<span @click="close()">close</span>
</template>
</dropdown-menu>
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
ts
import { ref } from 'vue'
const show = ref(false)
function close() {
show.value = true
}
1
2
3
4
5
2
3
4
5