Skip to content

NavigationTreeView ​

A tree with the tree roles, a roving tabindex, arrow keys, typeahead and expand all.

ts
import { NavigationTreeView } from '@zairakai/vue-components/Navigation'

Usage ​

vue
<NavigationTreeView />

Example ​

  • src
    • index.ts
    • utils.ts
  • README.md
vue
<script setup>
  import { ref } from 'vue'

  const selected = ref('a')
  const nodes = [
    {
      id: 'src',
      label: 'src',
      children: [
        { id: 'a', label: 'index.ts' },
        { id: 'b', label: 'utils.ts' },
      ],
    },
    { id: 'readme', label: 'README.md' },
  ]
</script>

<template>
  <NavigationTreeView
    v-model="selected"
    :nodes="nodes"
    label="Files"
    :expanded="['src']"
  />
</template>

Props ​

NameTypeDefaultDescription
idstring
classstring
nodesarray[]The tree: { id, label, disabled, children }.
modelValuestringundefinedThe id of the selected node.
expandedarrayundefinedThe ids of the open branches.
labelstring

Events ​

NameDescription
update:modelValue
update:expanded
select

Slots ​

NameDescription
default

See Theming for the class hooks and the data-* state of the components.

Documentation of 1.4.4 , built from 8e9b054 on 1.4.4 by pipeline #2989941079 on 2026-10-26.