All Projects → react-dropzone → file-selector

react-dropzone / file-selector

Licence: MIT license
Convert a DragEvent or file input to a list of File objects

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to file-selector

ngx-drag-and-drop-lists
Angular drag and drop component for lists
Stars: ✭ 47 (-22.95%)
Mutual labels:  drag-and-drop
Custom-Grid-View
Custom Drag and Drop Grid for Home Assistant
Stars: ✭ 103 (+68.85%)
Mutual labels:  drag-and-drop
dnd
Beautiful and accessible drag and drop for lists with React.
Stars: ✭ 271 (+344.26%)
Mutual labels:  drag-and-drop
UI-Builder
UI Builder to generate html pages automatically
Stars: ✭ 33 (-45.9%)
Mutual labels:  drag-and-drop
easy-drag
easy to realize drag and drop effect
Stars: ✭ 34 (-44.26%)
Mutual labels:  drag-and-drop
vue-drag-zone
Drag Zone component for @vuejs
Stars: ✭ 127 (+108.2%)
Mutual labels:  drag-and-drop
PTXQC
A Quality Control (QC) pipeline for Proteomics (PTX) results generated by MaxQuant
Stars: ✭ 34 (-44.26%)
Mutual labels:  drag-and-drop
slate-react-dnd-plugin
No description or website provided.
Stars: ✭ 35 (-42.62%)
Mutual labels:  drag-and-drop
reactablejs
A react high-order component for interact.js(drag and drop, resizing and multi-touch gestures).
Stars: ✭ 59 (-3.28%)
Mutual labels:  drag-and-drop
Tkinter-Designer
An easy and fast way to create a Python GUI 🐍
Stars: ✭ 4,697 (+7600%)
Mutual labels:  drag-and-drop
vue3-smooth-dnd
Vue3 wrapper components for smooth-dnd
Stars: ✭ 92 (+50.82%)
Mutual labels:  drag-and-drop
react-file-input
⚛️  A file Input, with drag'n'drop and image editor for React
Stars: ✭ 71 (+16.39%)
Mutual labels:  drag-and-drop
ngx-dropzone
A highly configurable dropzone component for Angular.
Stars: ✭ 123 (+101.64%)
Mutual labels:  drag-and-drop
dolphinnext
A graphical user interface for distributed data processing of high throughput genomics
Stars: ✭ 92 (+50.82%)
Mutual labels:  drag-and-drop
react-drag-list
A simple draggable list component。
Stars: ✭ 30 (-50.82%)
Mutual labels:  drag-and-drop
ng2-gridstack
A gridstack component for Angular2+
Stars: ✭ 12 (-80.33%)
Mutual labels:  drag-and-drop
simple-page-ordering
Order your pages and other hierarchical post types with simple drag and drop right from the standard page list.
Stars: ✭ 88 (+44.26%)
Mutual labels:  drag-and-drop
wp-tag-order
↕︎ Sort tags manually in individual posts (not site-globally) on WordPress.
Stars: ✭ 16 (-73.77%)
Mutual labels:  drag-and-drop
react-grid-dnd
drag and drop, grid edition. built with react
Stars: ✭ 161 (+163.93%)
Mutual labels:  drag-and-drop
cyclejs-sortable
Makes all children of a selected component sortable
Stars: ✭ 16 (-73.77%)
Mutual labels:  drag-and-drop

file-selector

A small package for converting a DragEvent or file input to a list of File objects.

npm Tests codecov Open Collective Backers Open Collective Sponsors Contributor Covenant

Table of Contents

Installation

You can install this package from NPM:

npm add file-selector

Or with Yarn:

yarn add file-selector

CDN

For CDN, you can use unpkg:

https://unpkg.com/file-selector/dist/bundles/file-selector.umd.min.js

The global namespace for file-selector is fileSelector:

const {fromEvent} = fileSelector;
document.addEventListener('drop', async evt => {
    const files = await fromEvent(evt);
    console.log(files);
});

Usage

ES6

Convert a DragEvent to File objects:

import {fromEvent} from 'file-selector';
document.addEventListener('drop', async evt => {
    const files = await fromEvent(evt);
    console.log(files);
});

Convert a change event for an input type file to File objects:

import {fromEvent} from 'file-selector';
const input = document.getElementById('myInput');
input.addEventListener('change', async evt => {
    const files = await fromEvent(evt);
    console.log(files);
});

Convert FileSystemFileHandle items to File objects:

import {fromEvent} from 'file-selector';

// Open file picker
const handles = await window.showOpenFilePicker({multiple: true});
// Get the files
const files = await fromEvent(handles);
console.log(files);

NOTE The above is experimental and subject to change.

CommonJS

Convert a DragEvent to File objects:

const {fromEvent} = require('file-selector');
document.addEventListener('drop', async evt => {
    const files = await fromEvent(evt);
    console.log(files);
});

Browser Support

Most browser support basic File selection with drag 'n' drop or file input:

For folder drop we use the FileSystem API which has very limited support:

Contribute

If you wish to contribute, please use the following guidelines:

Credits

Support

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].