https://github.com/davidfig/tree
vanilla-javascript drag-and-drop UI tree
https://github.com/davidfig/tree
Last synced: about 1 year ago
JSON representation
vanilla-javascript drag-and-drop UI tree
- Host: GitHub
- URL: https://github.com/davidfig/tree
- Owner: davidfig
- License: mit
- Created: 2018-04-30T04:12:03.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-09T01:14:11.000Z (over 3 years ago)
- Last Synced: 2025-04-14T23:44:20.152Z (about 1 year ago)
- Language: JavaScript
- Size: 1.77 MB
- Stars: 39
- Watchers: 2
- Forks: 5
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tree
Vanilla drag-and-drop UI tree
## Rationale
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.
## Super Simple Example
```js
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 })
```
## Live Examples
https://davidfig.github.io/tree/
## API Documentation
https://davidfig.github.io/tree/jsdoc/
## Installation
npm i yy-tree
## license
MIT License
(c) 2021 [YOPEY YOPEY LLC](https://yopeyopey.com/) by [David Figatner](https://twitter.com/yopey_yopey/)