New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-filetree-electron

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-filetree-electron

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

latest
Source
npmnpm
Version
1.2.2
Version published
Maintainers
1
Created
Source

react-filetree-electron

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


Screenshot

React Filetree Electron Demo

Installation

  • Note: requires node version >= 6 and an npm version >= 3.
npm install react-filetree-electron

OR, if using yarn

yarn add react-filetree-electron

Use

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.

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

FileTree Props

All props are optional except directory.

PropertyTypeOptions [default]Description
directorystringThe directory that acts as the tree root.
onFileClickfunctionA function to be performed when a user clicks a file list item (not a directory list item).
directoryThemestring['light'], 'dark'Theme for the directory icon
fileTreeStyleobject[{ fontFamily: 'sans-serif', listStyle: 'none' }]Merge or change style attributes for the overall file tree
directoryStyleobject[{ marginBottom: 3 }]Merge or change style attributes for the directory list items
fileStyleobject[{ 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

Keywords

react-filetree

FAQs

Package last updated on 08 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts