@klad/vue

Klad for Vue 3 — a canvas tree engine for tens of thousands of nodes. Tiered, file, radial and sunburst layouts, with your own components on the nodes.
2,933 33
Install
npm install @klad/vue
Latest Version:1.12.0
Vue:3
License:MIT
Last Updated:Oct 22, 2026
Links: GitHub  ·  npm
Maintainer: numberone

@klad/vue

npm gzip size licence

The Vue 3 adapter for Klad — a tree engine that stays smooth where a chart made of elements cannot, by laying out and drawing the tree on a <canvas> inside a Web Worker, overlaying real Vue components only for the nodes currently on screen and zoomed in far enough to read.

npm install @klad/vue

Peer dependency: vue >=3.5 <4.

<script setup lang="ts">
import { Klad } from '@klad/vue'
import type { Options } from '@klad/vue'

const options: Options = {
  data: [
    { id: 'ceo', name: 'Jamie Fox', title: 'CEO' },
    { id: 'cto', parentId: 'ceo', name: 'Amy Chen', title: 'CTO' },
  ],
}
</script>

<template>
  <Klad :options="options" style="width: 100%; height: 100vh">
    <template #node="{ item, hasChildren, open, toggle }">
      <div class="card">
        <strong>{{ String(item.name ?? '') }}</strong>
        <button v-if="hasChildren" type="button" @click="toggle">
          {{ open ? '−' : '+' }}
        </button>
      </div>
    </template>
  </Klad>
</template>

Reach the imperative API from a descendant component with useKlad() (const { api, state } = useKlad()), or from a template ref on <Klad> itself.

Guide, API reference and roadmap: the documentation.

Licence

MIT

Related Packages

liquor-tree

A Vue.js tree component.

222,635 392
liquor-tree-vue3

A Vue.js tree component.

21,118
vue-organization-chart

organization chart component based vuejs

120,364 303
bosket

A collection of tree views.

6,532 446

Version History

Version Released Vue License
1.12.0 >=3.5 <4 MIT
1.11.2 >=3.5 <4 AGPL-3.0-or-later
1.11.1 >=3.5 <4 AGPL-3.0-or-later
1.11.0 >=3.5 <4 AGPL-3.0-or-later
1.10.0 >=3.5 <4 AGPL-3.0-or-later
Pre-releases (1)
Version Released Vue License
1.0.0-alpha.0 >=3.5 <4 AGPL-3.0-or-later