A JavaScript library that can upload anything you throw at it, and offers a great, accessible, silky smooth user experience.
The <file-pond> custom element feels right at home on a classic webpage…
<file-pond>
<label for="my-file">Drop files here, or <u>browse</u></label>
<input id="my-file" type="file" name="docs" />
</file-pond>
<button type="submit">Upload</button>
<script type="module">
import { defineFilePond } from 'filepond';
import { locale } from 'filepond/locales/en-gb.js';
defineFilePond({ locale });
</script>
…and turns into a <Component> when used with a JavaScript framework.
export default function App() {
const [myEntries, setMyEntries] = useState<FilePondEntry[]>([]);
return (
<file-pond entries={myEntries}>
<label htmlFor="my-file">
Drop files here, or <u>browse</u>
</label>
<input id="my-file" type="file" name="docs" />
</file-pond>
);
}
The layout engine automagically animates elements to new positions resulting in a fully animated user interface no matter the CSS layout.
Accept files from paste events.
Accept files dropped on a specified element.
Accept files from a specified file input element
Convert Blob sources into Files.
Convert Canvas sources into Blobs.
Convert a DataTransfer into a File tree.
Convert URL sources into Files.
Simulate File loading.
Validate files based on their extension.
Validate files based on their mime type.
Validate files based on their name.
Validate files based on their min and/or max size.
Validate the file list based on the amount of files in the list.
Validate the file listsize based on the total size of the files in the list.
Validate images and videos based on their width and height values.
Store the encoded data URL of the file.
Store the file object using a form post.
Store the file object by uploading it in chunks.
Store the blob URL of a file.
Simulate storing a file.
Store a stringified representation of the current entry tree in a specified input element.
Handle storage with a callback function.
Renders the current state of the file tree to the developer console.
Renders the current state of the file tree to a specified HTML element.
Use appendEntryImageView and appendEntryVideoView to add media previews to the file entry.
Use FilePond without a user interface. Useful for programmatic processing of files or when building a custom UI on top of FilePond core.
import { createFilePondEntryTree, createExtensionManager } from "filepond";
const entryTree = createFilePondEntryTree();
const extensionManager = createExtensionManager(entryTree);
entryTree.entries = [new File(/* */)];
FilePond uses CSS color-scheme to make switching between light and dark mode super easy.
FilePond integrates beautifully with Pintura unlocking the perfect image editing experience for your users.
Learn more about Pintura Show demo integration