Skip to content

zk-tree ​

A tree of nested lists, with expandable branches.

Also available as x-zk-tree-view, the name that @zairakai/vue-components gives it.

Props ​

PropTypeDefaultDescription
labelstring|nullnullAccessible name of the list
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

Slots ​

SlotDescription
defaultThe zk-tree-item elements

It is made of lists and <details>, not an ARIA tree: no arrow-key navigation, the tab key goes through the labels. No JavaScript.

Examples ​

Files ​

blade
<x-zk-tree label="Files">
    <x-zk-tree-item label="src" :open="true">
        <x-zk-tree-item label="index.php" />
    </x-zk-tree-item>
    <x-zk-tree-item label="README.md" />
</x-zk-tree>

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.