Registry / web-framework / react-filepond

react-filepond

JSON →
library7.1.3jsnpmunverified

React FilePond is an official adapter component that seamlessly integrates the FilePond file upload library into React applications. It provides a declarative API for handling file uploads, previews, and interactions, leveraging FilePond's core features such as drag-and-drop, image optimization, asynchronous uploading, and accessibility. The current stable version is 7.1.3, indicating a mature and actively maintained library. Release cadence typically aligns with FilePond's core library updates and React ecosystem changes. Key differentiators include its robust feature set for file handling, excellent user experience, and a plugin architecture that allows for extended functionalities like image previews and EXIF orientation correction. It's designed to be highly responsive and functional across both desktop and mobile devices, making it suitable for a wide range of web projects requiring advanced file upload capabilities.

npm install react-filepond
INSTALL
IMPORT
SIG · REACT-FILEPOND
R
react-filepond
web-frameworkjavascriptv7.1.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FilePond
import { FilePond } from 'react-filepond';
const FilePond = require('react-filepond').FilePond;
Primary component for rendering the FilePond instance. Named import is standard.
registerPlugin
import { registerPlugin } from 'react-filepond';
import registerPlugin from 'react-filepond/registerPlugin';
Function to register FilePond plugins globally. Available as a named export from the main package.
FilePond styles
import 'filepond/dist/filepond.min.css';
Required to style the FilePond component. Import directly from the `filepond` package, not `react-filepond`.
Plugin styles
import 'filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css';
Many FilePond plugins have their own CSS that needs to be imported separately after installation.

Demonstrates a basic FilePond setup in a React functional component, including state management for files, registering common plugins (Image EXIF Orientation, Image Preview), and configuring a server endpoint for uploads.

import React, { useState } from 'react'; import ReactDOM from 'react-dom/client'; import { FilePond, registerPlugin } from 'react-filepond'; import 'filepond/dist/filepond.min.css'; import FilePondPluginImageExifOrientation from 'filepond-plugin-image-exif-orientation'; import FilePondPluginImagePreview from 'filepond-plugin-image-preview'; import 'filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css'; // Register the plugins (ensure they are installed via npm) registerPlugin(FilePondPluginImageExifOrientation, FilePondPluginImagePreview); function App() { const [files, setFiles] = useState([]); // Example of a dummy server endpoint for demonstration. // In a real app, this would point to your backend upload API. const serverEndpoint = process.env.REACT_APP_UPLOAD_API || '/api/upload'; return ( <div className="App" style={{ maxWidth: '500px', margin: '50px auto' }}> <h1>Upload Files</h1> <FilePond files={files} onupdatefiles={setFiles} allowMultiple={true} maxFiles={3} server={serverEndpoint} name="files" labelIdle='Drag & Drop your files or <span class="filepond--label-action">Browse</span>' /> {files.length > 0 && ( <div style={{ marginTop: '20px' }}> <h3>Current Files:</h3> <ul> {files.map((fileItem, index) => ( <li key={index}>{fileItem.file.name}</li> ))} </ul> </div> )} </div> ); } const root = ReactDOM.createRoot(document.getElementById('root')); root.render(<App />);
Debug
Known issues
breakingAs of version 7.1.0, `react-filepond` ships its own TypeScript types. The separate `@types/react-filepond` package is no longer needed and should be uninstalled.
fix
Uninstall the `@types/react-filepond` package: `npm uninstall @types/react-filepond` or `yarn remove @types/react-filepond`.
affects: >=7.1.0
gotchaFilePond plugins (e.g., Image Preview, EXIF Orientation) and their associated styles must be installed and imported separately from `react-filepond` and `filepond` itself. Failing to install/import them will result in missing functionality or broken styling.
fix
Ensure all required plugins are installed (`npm i filepond-plugin-image-preview filepond-plugin-image-exif-orientation`) and their styles imported (`import 'filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css';`) in addition to `filepond.min.css`.
affects: >=3.x
gotchaThe `filepond` core library and `react-filepond` have peer dependencies on `react` and `react-dom` within specific version ranges. Mismatched React versions can lead to rendering issues or crashes.
fix
Ensure your project's `react` and `react-dom` versions (16-19 for `react-filepond` v7) satisfy the peer dependency requirements of both `filepond` and `react-filepond`.
affects: >=3.7.x
Errors
Common errors & fixes
TypeError: registerPlugin is not a function
Attempting to call `registerPlugin` without importing it as a named export, or using a CommonJS `require` that doesn't correctly destructure the export.
fix
Ensure you are using `import { registerPlugin } from 'react-filepond';` for ESM environments, or access it via `require('react-filepond').registerPlugin` for CommonJS.
Module not found: Can't resolve 'filepond/dist/filepond.min.css'
The `filepond` package or its styles are not correctly installed or the import path is wrong.
fix
Verify `filepond` is installed via `npm install filepond` and the import path `filepond/dist/filepond.min.css` is correct and accessible.
Property 'files' does not exist on type 'IntrinsicAttributes & FilePondProps'. Did you mean 'file'?
This TypeScript error indicates a type mismatch, often because `@types/react-filepond` is still installed alongside the new built-in types from `react-filepond` v7.1.0+.
fix
Remove the `@types/react-filepond` package from your project as `react-filepond` now ships its own types (`npm uninstall @types/react-filepond`).
Upgrade
Version history
7.1.3latest on npm
Audit
Dependencies
reactrequiredPeer dependency for React applications.
react-domrequiredPeer dependency for rendering React components.
filepondrequiredCore library that react-filepond wraps; essential for functionality.
filepond-plugin-image-exif-orientationoptionalOptional plugin for image EXIF orientation correction, commonly used.
filepond-plugin-image-previewoptionalOptional plugin for image preview functionality, commonly used.
Agent activity
4 hits · last 30 days
node
4
Resources
react-filepond — npm install react-filepond · libregistry