Skip to content
On this page

NcAppNavigationIconCollapsible

Props

Prop nameDescriptionTypeValuesDefault
openboolean-true

Events

Event namePropertiesDescription
click

NcAppNavigationItem

Props

Prop nameDescriptionTypeValuesDefault
titleThe title of the element.string-
idid attribute of the list item elementstring-() => 'app-navigation-item-' + GenRandomId()
iconRefers to the icon on the left, this prop accepts a class
like 'icon-category-enabled'.
string-''
loadingDisplays a loading animated icon on the left of the element
instead of the icon.
boolean-false
toPassing in a route will make the root element of this
component a <router-link /> that points to that route.
By leaving this blank, the root element will be a <li>.
string|object-''
exactPass in true if you want the matching behaviour to
be non-inclusive: https://router.vuejs.org/api/#exact
boolean-false
allowCollapseGives the possibility to collapse the children elements into the
parent element (true) or expands the children elements (false).
boolean-false
editableMakes the title of the item editable by providing an ActionButton
component that toggles a form
boolean-false
editLabelOnly for 'editable' items, sets label for the edit action button.string-''
editPlaceholderOnly for items in 'editable' mode, sets the placeholder text for the editing form.string-''
pinnedPins the item to the bottom left area, above the settings. Do not
place 'non-pinned' AppnavigationItem components below pinned
ones.
boolean-false
undoPuts the item in the 'undo' state.boolean-false
openThe navigation collapsible state (synced)boolean-false
menuOpenThe actions menu open state (synced)boolean-false
forceMenuForce the actions to display in a three dot menuboolean-false
menuIconThe action's menu default iconstring-undefined
menuPlacementThe action's menu directionstring-'bottom'
ariaDescriptionEntry aria detailsstring-null
forceDisplayActionsTo be used only when the elements in the actions menu are very importantboolean-false

Events

Event namePropertiesDescription
update:menuOpen
update:open
update:title
click
undo

Slots

NameDescriptionBindings
icon
counter
menu-iconSlot for the custom menu icon
actions
extra
default

Usage

Simple element

  • With an icon:
<NcAppNavigationItem title="My title" icon="icon-category-enabled" />

  • With a spinning loader instead of the icon:
<NcAppNavigationItem title="Loading Item" :loading="true" />

Element with actions

Wrap the children in a template. If you have more than 2 actions, a popover menu and a menu button will be automatically created.

<div id="app-navigation-vue"><!-- Just a wrapper necessary in the docs. Not needed when NcAppNavigation is correctly used as parent. -->
	<NcAppNavigationItem title="Item with actions" icon="icon-category-enabled">
		<template #actions>
			<NcActionButton icon="icon-edit" @click="alert('Edit')">
				Edit
			</NcActionButton>
			<NcActionButton icon="icon-delete" @click="alert('Delete')">
				Delete
			</NcActionButton>
			<NcActionLink icon="icon-external" title="Link" href="https://nextcloud.com" />
		</template>
	</NcAppNavigationItem>
</div>

Element with counter

Just nest the counter in a template within <NcAppNavigationItem> and add #counter to it.

<NcAppNavigationItem title="Item with counter" icon="icon-folder">
	<template #counter>
		<NcCounterBubble>
			99+
		</NcCounterBubble>
	</template>
</NcAppNavigationItem>

Element with children

Wrap the children in a template with the slot property and use the prop allowCollapse to choose wether to allow or prevent the user from collapsing the items.

<NcAppNavigationItem title="Item with children" :allowCollapse="true" :open="true">
	<template>
		<NcAppNavigationItem title="AppNavigationItemChild1" />
		<NcAppNavigationItem title="AppNavigationItemChild2" />
		<NcAppNavigationItem title="AppNavigationItemChild3" />
		<NcAppNavigationItem title="AppNavigationItemChild4" />
	</template>
</NcAppNavigationItem>

Editable element

Add the prop :editable=true and an edit placeholder if you need it. By default the placeholder is the previous title of the element.

<NcAppNavigationItem title="Editable Item" :editable="true"
	editPlaceholder="your_placeholder_here" icon="icon-folder" @update:title="function(value){alert(value)}" />

Undo element

Just set the undo and title props. When clicking the undo button, an undo event is emitted.

<NcAppNavigationItem :undo="true" title="Deleted important entry" @undo="alert('undo delete')"  />

Pinned element

Just set the pinned prop.

<NcAppNavigationItem title="Pinned item" :pinned="true" />

NcInputConfirmCancel

Props

Prop nameDescriptionTypeValuesDefault
placeholderstring-''
valuestring-''

Events

Event namePropertiesDescription
input
confirm
cancel

Usage

<NcInputConfirmCancel @confirm="alert('confirm')" @cancel="alert('cancel')" />