# yy-tree

> vanilla drag-and-drop UI tree

Latest version **0.6.2** (published 2020-12-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install yy-tree
pnpm add yy-tree
yarn add yy-tree
bun add yy-tree
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.2 |
| Published | 2020-12-26 |
| First published | 2018-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | davidfig |

## Links

- npm: https://www.npmjs.com/package/yy-tree
- npm.io page: https://npm.io/package/yy-tree

## Dependencies (2)

- [clicked](https://npm.io/package/clicked.md) ^2.0.0
- [eventemitter3](https://npm.io/package/eventemitter3.md) ^3.0.1

## Recent versions

- 0.6.2 (latest) — 2020-12-26
- 0.6.1 — 2020-12-26
- 0.6.0 — 2020-12-26
- 0.5.2 — 2020-12-26
- 0.5.1 — 2020-12-25
- 0.5.0 — 2020-12-25
- 0.4.2 — 2018-05-02
- 0.4.1 — 2018-05-02
- 0.4.0 — 2018-05-02
- 0.3.0 — 2018-05-02
- 0.2.2 — 2018-05-02
- 0.2.1 — 2018-05-02
- 0.2.0 — 2018-05-02

## 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/)

---
_Source: https://npm.io/package/yy-tree · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
