Use the Headless file input component to create your own avatar upload component. It works the same as a regular file input, but you can style it however you want. Below is an example of an avatar upload component.
Show codeHide code
Use the Headless file input component to create your own file upload component. It works the same as a regular file input, but you can style it however you want. Below is an example of a file upload component.
Drop files to upload
Or
Show codeHide code
Name
Type
Default
id
The form input identifier.
Show exampleHide example
filter-file-dropped
Allows to filter files when dropped.
Show exampleHide example
Name
Type
el
The underlying HTMLInputElement element.
Show exampleHide example
files
The model value of the file input.
Show exampleHide example
open
Opens the native file input selector.
Show exampleHide example
remove
Removes a file from the input.
Show exampleHide example
preview
Returns the preview DataURL of a file.
Show exampleHide example
drop
Handles the drop event.