mtsewrs / react-filepond

⚛ A handy FilePond wrapper component for React

Home Page:https://pqina.nl/filepond

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React FilePond

React FilePond is a handy wrapper component for FilePond, a JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user experience.

Installation:

npm install react-filepond --save

Usage:

import { FilePond, File } from 'react-filepond';

class App extends Component {
    constructor(props) {
        super(props);

        this.state = {
            files: ['index.html']
        };
    }

    render() {
        return (
            <div className="App">
            
                // Pass FilePond properties as attributes
                <FilePond allowMultiple={true} maxFiles={3} server='/api'>
                    
                    // Set current files using the <File/> component
                    {this.state.files.map(file => (
                        <File key={file} source={file} />
                    ))}
                    
                </FilePond>
            </div>
        );
    }
}

Read the docs for more information

Licensing

Read FilePond readme for licensing options

About

⚛ A handy FilePond wrapper component for React

https://pqina.nl/filepond

License:MIT License


Languages

Language:JavaScript 100.0%