About how the <file-pond> custom element functions in a form.

Form Behaviour

FilePond won’t affect the behavior of the form. When we submit the form it still synchronously posts any files selected in FilePond to the server.

Element Internals

The <file-pond> element implements ElementInternals, this means it behaves like a normal form element. Among others it has a value property, can trigger validation, and carries a reference to the parent form element.

Embeddeds styles

The <file-pond> element styles are embedded in the custom element, there’s no need to link a separate stylesheet.

Syncs input attributes

FilePond copies relevant attributes that are set on the file input element to the <file-pond> element, in the getting started guide that would be the required attribute.

The same happens the other way around. If the max-files attribute is present on the <file-pond> element and it has a value of '1' the multiple attribute on the internal input will be removed.

Acts as a component

When using <file-pond> in a plain HTML page we can set a limited selection of string based attributes on the <file-pond> element, other properties need to be set on the element reference.

When we’re using a JavaScript framework the <file-pond> custom element behaves like a component and properties can be set directly on the element <file-pond property={value}>.