Skip to content

tree-elementTree widget in plain javascript

A dependency-free tree view with drag and drop, keyboard navigation, lazy loading and state persistence.

Try it ​

This is the widget itself, built from src in this repository. Open the folders, select a node, walk through it with the arrow keys, and drag a node somewhere else.

js
new TreeElement({
  autoOpen: 1,
  data,
  dragAndDrop: true,
  htmlElement: document.getElementById("tree1"),
});

Start with the guide, or go straight to the options.