• Stars
    star
    296
  • Rank 140,464 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 8 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

react-keyed-file-browser

Build Status npm version Downloads

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

Live Demo

Check out the live demo here: http://uptick.github.io/react-keyed-file-browser/

Installation

Install the package with npm:

# NPM
npm install react-keyed-file-browser

# Yarn
yarn add react-keyed-file-browser
import React from 'react'
import ReactDOM from 'react-dom'

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

ReactDOM.render(
  <FileBrowser
    files={[]}
  />,
  document.getElementById('root')
);

Include icons from FontAwesome 4:

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

import FileBrowser, { Icons } from 'react-keyed-file-browser'

// this imports the FontAwesome Icon Styles
import 'font-awesome/css/font-awesome.min.css'

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

or your own icons by specifying as so:

  <FileBrowser
    files={[]}
    icons={{
      File: <i className="file" aria-hidden="true" />,
      Image: <i className="file-image" aria-hidden="true" />,
      PDF: <i className="file-pdf" aria-hidden="true" />,
      Rename: <i className="i-cursor" aria-hidden="true" />,
      Folder: <i className="folder" aria-hidden="true" />,
      FolderOpen: <i className="folder-open" aria-hidden="true" />,
      Delete: <i className="trash" aria-hidden="true" />,
      Loading: <i className="circle-notch spin" aria-hidden="true" />,
    }}
  />

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"
>

Examples

Using a custom drag and drop provider.

import { RawFileBrowser } from 'react-keyed-file-browser'

import { DndProvider } from 'react-dnd'
import { HTML5Backend } from 'react-dnd-html5-backend'

<DndProvider backend={HTML5Backend}>
  <RawFileBrowser files={[]}/>
</DndProvider>

Full reference documentation coming soon. For now, take a look at the reference implementation with event handlers on the live demo at http://uptick.github.io/react-keyed-file-browser/.

More Repositories

1

django-cq

Distributed tasks for Django Channels.
Python
46
star
2

react-interactive-tutorials

Framework for creating unobtrusive interactive tutorials for use in web apps.
JavaScript
40
star
3

django-rest-framework-aggregates

Exposes aggregation features of the Django model queryset to the DRF API.
Python
23
star
4

django-dramatiq-pg

Python
23
star
5

django-model-import

Django Model Import -- a fast CSV importer
Python
19
star
6

pymyob

A Python SDK for the MYOB Business (formerly AccountRight Live, and New Essentials) API.
Python
17
star
7

react-object-table

React powered table of objects, designed to be editable and fast.
JavaScript
15
star
8

react-object-list

Neat table/list views with filtering and pagination support; powered by React.
JavaScript
13
star
9

pyworkflowmax

A Python API around WorkflowMax's REST API
Python
6
star
10

django-futon

A lightweight application for synchronising Django models between sites using RESTful APIs.
Python
6
star
11

react-recurring

A recurring date selection widget for React.
JavaScript
5
star
12

python-fuku

Easier Docker based deployments to AWS.
Python
4
star
13

django-user-defined-fields

Used Defined Fields for Django
Python
4
star
14

pybusinesscentral

Python API for Business Central
Python
4
star
15

gitops

Automatically provision Kubernetes resources defined by a git repository.
Python
4
star
16

react-scaled-scheduler

Scheduler with events drawn to scale along a time axis, with drag and drop support
JavaScript
3
star
17

react-day-input

A simple date picker for react, powered by Moment.
JavaScript
3
star
18

django-pev

Django Postgres Explain Visualizer (via https://explain.dalibo.com)
HTML
3
star
19

react-nested-validation

A toolkit for performing nested validation of forms in React.
JavaScript
2
star
20

bronski

Python
2
star
21

helm-charts

Uptick helm chart repo
Smarty
1
star
22

react-bucketed-scheduler

Scheduler with events listed (not to scale), grouped into bucketed drop zones
JavaScript
1
star
23

event-time-utils

A collection of utilities based around events with begins/ends timestamps
JavaScript
1
star
24

django-xauth

A simple Django application for AJAX authorisation.
Python
1
star
25

bouncer

Stateless OAuth reverse HTTP proxy
Python
1
star