Vanilla drag-and-drop UI tree
I needed a tree components for my tools. Most of the available visual tree APIs require vue or react. And so yy-tree was created.
const data = {
children: [
{ name: 'fruits', children: [
{ name: 'apples', children: [] },
{ name: 'oranges', children: [
{ name: 'tangerines', children: [] },
{ name: 'mandarins', children: [] },
{ name: 'pomelo', children: [] },
{ name: 'blood orange', children: [] },
] }
]},
{ name: 'vegetables', children: [
{ name: 'brocolli', children: [] },
] },
]
}
const tree = new Tree(data, { parent: document.body })
https://davidfig.github.io/tree/
https://davidfig.github.io/tree/jsdoc/
npm i yy-tree
MIT License (c) 2021 YOPEY YOPEY LLC by David Figatner