# tree-view

> tree explorer UI module

Latest version **2.2.0** (published 2014-10-22) · BSD license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2014-10-22 |
| First published | 2014-10-15 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 89 |
| Author | max ogden |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/tree-view
- Repository: https://github.com/maxogden/tree-view
- Issues: https://github.com/maxogden/tree-view/issues
- npm.io page: https://npm.io/package/tree-view

## Dependencies (3)

- [brfs](https://npm.io/package/brfs.md) ^1.2.0
- [react](https://npm.io/package/react.md) ^0.11.2
- [defaultcss](https://npm.io/package/defaultcss.md) ^1.1.0

## Recent versions

- 2.2.0 (latest) — 2014-10-22
- 2.1.3 — 2014-10-15
- 2.1.2 — 2014-10-15
- 2.1.1 — 2014-10-15
- 2.1.0 — 2014-10-15
- 2.0.0 — 2014-10-15

## README

# tree-view

Tree viewing widget for the browser

```
npm install tree-view
```

Try out the demo by doing

```
npm install
npm start
```

## Usage

``` js
var path = require('path')
var tree = require('tree-view')

var browser = tree() // or tree({style:false}) to disable styling

browser.on('directory', function(p, entry) {
  console.log('You clicked on a directory (%s)', p)
  browser.directory(p, [{
    path: path.join(p, '/foo'),
    type: 'directory'
  }, {
    path: path.join(p, '/bar'),
    type: 'directory'
  }, {
    path: path.join(p, '/baz'),
    type: 'file'
  }])
})

browser.on('file', function(p, entry) {
  console.log('You clicked on a file (%s)', p)
})

browser.directory('/', [{
  path: '/foo',
  type: 'directory'
}, {
  path: '/bar',
  type: 'directory'
}, {
  path: '/baz',
  type: 'file'
}])

browser.appendTo(document.body)
```

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