treeui

a tree user interface for files and other things

treeui

A simple collapsible tree ui, for file selectors and the like.

npm install --save treeui

Live example on requirebin

var treeui = require('treeui');
 
treeui(request)
    .onclick(function(level) {
        console.log(level);
    })
    .appendTo(document.body);
 
function request(treecallback) {
    callback(null, [1 + tree, 2 + tree, 3 + tree]);
}

Request is a function that takes (level, callback) and calls callback with (err, results), where results is an array.

Call callback with the tree level of clicked items

Append the UI to a given DOM element.