The defineFilePond function registers the <file-pond> custom element on the page and returns all <file-pond> elements currently active on the page.

import { defineFilePond } from 'filepond';
import { locale } from 'filepond/locales/en-gb.js';

const elements = defineFilePond({
    locale,
});

defineFilePond accepts a DefineFilePondOptions object that is automatically passed to every existing and newly created <file-pond> element.

When called a second time it overwrites the previous DefineFilePondOptions object, it won’t attempt to re-register the <file-pond> element.

The “locale” property is optional, but without it all FilePond labels will show locale keys instead of labels.

defineFilePond internally calls createFilePondExtensionSet to automatically load a default set of extensions.

We can add custom extensions by setting the “extensions” property, see Extensions for more information.