Appearance
MenuItem
A single element for the menu. It can be used in Dropdown or in a static component.
Props
title
required
Tytuł elemnetu
type:
String
default:
''
iconfile
Plik ikonki
type:
Object
Slots
default
Space for an additional element on the right
Examples
Elements from Dropdown and icon
html
<dropdown :close="show" @hide-floating="show=false">
<template #trigger>
<btn color="primary" text="Button" />
</template>
<template #content>
<div class="pb-1 pt-1.5">
<menu-item :iconfile="home" title="Menu item 1" to="/" />
<menu-item @click="change()" :iconfile="home" title="Menu item 2" />
<menu-item @click="change()" :iconfile="home" title="Menu item 3" />
<separator size="xs" />
<menu-item @click="change()" :iconfile="home" title="Menu item 4" />
</div>
</template>
</dropdown>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
ts
import home from '../../../src/components/icons/IconHome.vue'
import { ref } from 'vue'
const show = ref(false)
function change() {
show.value = !show.value
}
1
2
3
4
5
6
2
3
4
5
6
Elements with dropdown and elements on the right