@grapoza/vue-tree

Tree components for Vue 3
75,025 110
Install
npm install @grapoza/vue-tree
Latest Version:7.0.4
Vue:3
Older releases:2
License:MIT
Last Updated:Dec 18, 2025
Links: GitHub  ·  npm
Maintainer: grapoza

vue-tree

vue-tree is a Vue component that implements a Tree View control. Its aim is to provide common tree options in a way that is easy to use and easy to customize.

License: MIT Build status

Full Documentation

See the full documentation over at the project's Github Pages. This includes information on how to use and configure the tree view, features (both existing and planned) as well as some demos.

Installation

Install the component with your favorite package manager:

yarn add @grapoza/vue-tree

or

npm install --save @grapoza/vue-tree

or

bun add @grapoza/vue-tree

Usage

If you're using it in a .vue file:

<template>
  <TreeView  id="my-tree" v-model="dataModel" />
</template>

// Options API
<script>
import { TreeView } from "@grapoza/vue-tree"

export default {
  components: {
    TreeView
  },
  data() {
    return {
      dataModel: [
        {
          id: "numberOrString",
          label: "Root Node",
          children: [
            {id: 1, label: "Child Node"},
            {id: "node2", label: "Second Child"}
          ]
        }
      ]
    }
  }
}
</script>

// Composition API
<script setup>
import { TreeView } from "@grapoza/vue-tree"
const dataModel = ref([
  {
    id: "numberOrString",
    label: "Root Node",
    children: [
      {id: 1, label: "Child Node"},
      {id: "node2", label: "Second Child"}
    ]
  }
])
</script>

Or, import it into your application:

import { TreeView } from "@grapoza/vue-tree"
Vue.use(TreeView)

Then add the component:

<TreeView id="my-tree" v-model="dataModel" />
export default {
  data() {
    return {
      dataModel: [
        {id: "numberOrString", label: "Root Node", children: [
          {id: 1, label: "Child Node"},
          {id: "node2", label: "Second Child"}]
        }]
    }
  }
}

Related Packages

liquor-tree

A Vue.js tree component.

222,635 392
liquor-tree-vue3

A Vue.js tree component.

21,118
@bimetal/tree-vue-components

Default Vue 3 tree / treeview — multi-select, expand/collapse, tri-state checkbo...

1,849
v-tree-vue

A light-weight library for management of hierachical content. Most solutions I f...

1,957 30
vue-jstree

a tree plugin for vue2

137,015 630

Version History

Version Released License
7.0.4 MIT
7.0.3 MIT
7.0.2 MIT
7.0.1 MIT
7.0.0 MIT