Skip to content

vue
<div style="position: relative; width: 100%; height: 800px; display: flex;">
    <fv-NavigationView :options="options"></fv-NavigationView>
    <fv-img src="https://placehold.co/1280x720/png?text=VFluent+Navigation+View" style="width: 350px; height: 100%; flex: 1;"></fv-img>
</div>

vue
<div style="position: relative; width: 100%; height: 800px; display: flex;">
    <fv-NavigationView :options="options" expandMode="flyout"></fv-NavigationView>
    <fv-img src="https://placehold.co/1280x720/png?text=VFluent+Navigation+View" style="width: 350px; height: 100%; flex: 1;"></fv-img>
</div>

vue
<div style="position: relative; width: 100%; height: 800px; display: flex;">
    <fv-NavigationView :options="options" mobileDisplay="100000000" flyoutDisplay="500"></fv-NavigationView>
    <fv-img src="https://placehold.co/1280x720/png?text=VFluent+Navigation+Panel" style="width: 350px; height: 100%; flex: 1;"></fv-img>
</div>

  1. Standard
vue
<div style="position: relative; width: 100%; height: 800px; background: black; display: flex;">
    <fv-NavigationView :options="options" theme="dark"></fv-NavigationView>
    <fv-img src="https://placehold.co/1280x720/png?text=VFluent+Navigation+Panel" style="width: 350px; height: 100%; flex: 1;"></fv-img>
</div>
  1. Flyout
vue
<div style="position: relative; width: 100%; height: 800px; background: black; display: flex;">
    <fv-NavigationView :options="options" expandMode="flyout" theme="dark"></fv-NavigationView>
    <fv-img src="https://placehold.co/1280x720/png?text=VFluent+Navigation+Panel" style="width: 350px; height: 100%; flex: 1;"></fv-img>
</div>
  1. Mobile
vue
<div style="position: relative; width: 100%; height: 800px; background: black; display: flex;">
    <fv-NavigationView :options="options" mobileDisplay="100000000" flyoutDisplay="500" theme="dark"></fv-NavigationView>
    <fv-img src="https://placehold.co/1280x720/png?text=VFluent+Navigation+Panel" style="width: 350px; height: 100%; flex: 1;"></fv-img>
</div>

Properties


PropertyTypeRequiredDefaultDescription
modelValueobjectNo{}See the NavigationView modelValue option.
optionsarrayNo[]See the NavigationView options option.
titlestringNo'NavigationView'See the NavigationView title option.
expandbooleanNotrueSee the NavigationView expand option.
expandModestringNo'relative'See the NavigationView expandMode option.
expandWidthnumberNo350See the NavigationView expandWidth option.
expandDisplaynumberNo1024See the NavigationView expandDisplay option.
compactWidthnumberNo46See the NavigationView compactWidth option.
flyoutDisplaynumberNo0See the NavigationView flyoutDisplay option.
fullSizeDisplaynumberNo800See the NavigationView fullSizeDisplay option.
mobileDisplaynumberNo0See the NavigationView mobileDisplay option.
showBackbooleanNotrueSee the NavigationView showBack option.
showSearchbooleanNotrueSee the NavigationView showSearch option.
settingTitlestringNo'Settings'See the NavigationView settingTitle option.
showSettingbooleanNotrueSee the NavigationView showSetting option.
searchPlaceholderstringNo'Search'See the NavigationView searchPlaceholder option.
foregroundstringNo''See the NavigationView foreground option.
backgroundstringNo''See the NavigationView background option.
themestringNo'global'Theme style. Supports global, light, dark, system, and custom.
emitsarrayNo[ 'update:modelValue', 'expand-change', 'setting-click', 'item-click', 'back', 'expand-click', 'update:expand' ]See the NavigationView emits option.
showNavbooleanNotrueSee the NavigationView showNav option.
disabledbooleanNofalseSee the NavigationView disabled option.
langstringNo"global"See the NavigationView lang option.

Events


EventArgumentsDescription
item-clickobjectSee the component item-click option.
setting-clickObjectSee the component setting-click option.
update:expandbooleanSee the component update:expand option.
expand-changebooleanSee the component expand-change option.
expand-click
backMouseEventSee the component back option.

Slots


  1. ListItem
vue
<template v-slot:listItem="x">
    <i v-show="x.valueTrigger(x.item.icon) !== undefined" class="ms-Icon icon" :class="[`ms-Icon--${x.valueTrigger(x.item.icon)}`]"></i>
    <p class="name" :style="{ color: x.valueTrigger(x.item.type) == 'header' ? foreground : ''}">{{x.valueTrigger(x.item.name)}}</p>
</template>
  1. NavIcon
vue
<template v-slot:navIcon>
    <i class="ms-Icon ms-Icon--GlobalNavButton icon"></i>
</template>
  1. BackIcon
vue
<template v-slot:backIcon>
    <i class="ms-Icon ms-Icon--Back icon"></i>
</template>
  1. Title
vue
<template v-slot:title="{ show }">
    <p v-show="show" class="name title">{{ title }}</p>
</template>
  1. Banner
vue
<template v-slot:banner>
    <div class="banner">
        <img src="https://placehold.co/200x300/png?text=Logo" alt="logo" />
    </div>
</template>
  1. Setting

Use this slot to render custom content in the settings entry area.

vue
<template v-slot:setting>
    <fv-animated-icon 
        v-show="showSetting"
        ref="setting"
        modelValue="bounceRotate"
        class="fv-nav-default-item"
        :hideContent="!thisExpand"
        style="width: calc(100% - 10px)"
        @click="settingClick({ event: $event })"
    >
        <i class="ms-Icon ms-Icon--Settings icon"></i>
        <template v-slot:content>
            <p class="name">{{ settingTitle }}</p>
        </template>
    </fv-animated-icon>
</template>
  1. Mask

Use this slot to render a custom overlay mask for the whole component, for example a global loading layer.

vue
<fv-NavigationView :options="options">
    <template v-slot:mask>
        <div
            style="
                position: absolute;
                inset: 0;
                display: flex;
                align-items: center;
                justify-content: center;
                background: rgba(0, 0, 0, 0.35);
                color: white;
                z-index: 10;
            "
        >
            Loading...
        </div>
    </template>
</fv-NavigationView>

Data


  1. options
javascript
options = [{ key: "", name: "", type: "", icon: "", disabled: "" }];

//e.g.//

options: [
    { key: 0, name: "Fruits", type: "header"},
    { key: 1, name: "Apple", icon: "WindowsLogo"},
    { key: 2, name: "Banana", icon: "DelveAnalyticsLogo"},
    { key: 3, name: "Orange", icon: "Guitar"},
    { key: 4, name: "Grape", icon: "HailDay"},
    { key: 5, name: "", type: "divider" },
    { key: 6, name: "Vegetables", type: "header"},
    { key: 7, name: "Broccoli", icon: "QuadColumn"},
    { key: 8, name: "Carrot", icon: "Quantity"},
    { key: 9, name: "Lettuce", icon: "TestBeaker"}
];

Appendix


MIT Licensed