Folder based file browser given a flat keyed list of objects

react-keyed-file-browser

Folder based file browser given a flat keyed list of objects, powered by React.

Installation

Install the package with npm:

npm install react-keyed-file-browser

Then require and use with ES6 imports:

import React from 'react'
import ReactDOM from 'react-dom'

import FileBrowser from 'react-keyed-file-browser'

var mount = document.querySelectorAll('div.browser-mount');
ReactDOM.render(
  <FileBrowser
    files=[]
  />,
  mount[0]
);

Optionally, include the built css with an import:

@import 'node_modules/react-keyed-file-browser/dist/react-keyed-file-browser.css';

or tag:

<link
  href="static/node_modules/react-keyed-file-browser/dist/react-keyed-file-browser.css"
  rel="stylesheet"
>

GitHub