# react-filetree-electron

> An easily styled dynamic filetree component for use in native electron apps.

Latest version **1.2.2** (published 2017-07-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-filetree-electron
pnpm add react-filetree-electron
yarn add react-filetree-electron
bun add react-filetree-electron
```

## 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 | 1.2.2 |
| Published | 2017-07-08 |
| First published | 2017-06-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 21 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 58 |
| Author | M. Peritz |
| Maintainers | mperitz |
| Keywords | react-filetree, react-component, filetree, electron, react, redux, webpack |

## Links

- npm: https://www.npmjs.com/package/react-filetree-electron
- Repository: https://github.com/mperitz/react-filetree-electron
- Homepage: https://github.com/mperitz/react-filetree-electron#readme
- Issues: https://github.com/mperitz/react-filetree-electron/issues
- npm.io page: https://npm.io/package/react-filetree-electron

## Dependencies (21)

- [chai](https://npm.io/package/chai.md) ^4.0.0
- [jsdom](https://npm.io/package/jsdom.md) 9.9.1
- [react](https://npm.io/package/react.md) ^15.5.4
- [redux](https://npm.io/package/redux.md) ^3.6.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [history](https://npm.io/package/history.md) ^4.6.1
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.0
- [react-dom](https://npm.io/package/react-dom.md) ^15.5.4
- [chai-enzyme](https://npm.io/package/chai-enzyme.md) ^0.7.1
- [react-redux](https://npm.io/package/react-redux.md) ^5.0.4
- [redux-thunk](https://npm.io/package/redux-thunk.md) ^2.2.0
- [react-router](https://npm.io/package/react-router.md) ^4.1.1
- [redux-logger](https://npm.io/package/redux-logger.md) ^3.0.6
- [electron-debug](https://npm.io/package/electron-debug.md) ^1.1.0
- [react-hot-loader](https://npm.io/package/react-hot-loader.md) 3.0.0-beta.6
- [react-router-dom](https://npm.io/package/react-router-dom.md) ^4.1.1
- [react-router-redux](https://npm.io/package/react-router-redux.md) ^5.0.0-alpha.6
- [source-map-support](https://npm.io/package/source-map-support.md) ^0.4.14
- [eslint-config-fullstack](https://npm.io/package/eslint-config-fullstack.md) ^2.8.1
- [redux-devtools-extension](https://npm.io/package/redux-devtools-extension.md) ^2.13.2
- [extract-text-webpack-plugin](https://npm.io/package/extract-text-webpack-plugin.md) ^2.1.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.2 (latest) — 2017-07-08
- 1.2.1 — 2017-07-07
- 1.2.0 — 2017-06-19
- 1.1.8 — 2017-06-19
- 1.1.7 — 2017-06-04
- 1.1.6 — 2017-06-04
- 1.1.5 — 2017-06-02
- 1.1.4 — 2017-06-02
- 1.1.3 — 2017-06-02
- 1.1.2 — 2017-06-02
- 1.1.1 — 2017-06-02
- 1.1.0 — 2017-06-02
- 1.0.5 — 2017-06-02
- 1.0.4 — 2017-06-02
- 1.0.3 — 2017-06-01
- … 3 more at https://npm.io/package/react-filetree-electron/versions

## README

# react-filetree-electron

### A fully customizable file tree that expands and contracts with the click of a button!

<br/>

## Screenshot

![React Filetree Electron Demo](https://media.giphy.com/media/GPIRkqWzkETJu/giphy.gif)

## Installation

* **Note: requires node version >= 6 and an npm version >= 3.**

```bash
npm install react-filetree-electron
```

### OR, if using yarn

```bash
yarn add react-filetree-electron
```

## Use

```js
import FileTree from 'react-filetree-electron';
```

### Then just use it like a normal React component.  Make sure to provide a string to act as the directory path.  This is the only required property, but there are many optional properties.  See below.

```jsx
const directory = '/Users/Your-Name-Here/Directory'
<FileTree directory={directory} />
```

## FileTree Props
### All props are optional **except directory**.
| Property         | Type     | Options [default]                                 | Description                                                                                 |
| :--------------- |:--------:| :----------------------------------------------:  | :------------------------------------------------------------------------------------------ |
| directory        | string   |                                                   | The directory that acts as the tree root.                                                   |
| onFileClick      | function |                                                   | A function to be performed when a user clicks a file list item (not a directory list item). |
| directoryTheme   | string   | ['light'], 'dark'                                 | Theme for the directory icon                                                                |
| fileTreeStyle    | object   | [{ fontFamily: 'sans-serif', listStyle: 'none' }] | Merge or change style attributes for the overall file tree                                  |
| directoryStyle   | object   | [{ marginBottom: 3 }]                             | Merge or change style attributes for the directory list items                               |
| fileStyle        | object   | [{ marginBottom: 3 }]                             | Merge or change style attributes for the file list items                                    |

## Special Thanks
* react-electron-boilerplate was used for the example and for development purposes (https://github.com/chentsulin/electron-react-boilerplate)

## License
MIT

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