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
idThe form input identifier.
Show exampleHide example
filter-file-droppedAllows to filter files when dropped.
Show exampleHide example
Name
Type
elThe underlying HTMLInputElement element.
Show exampleHide example
filesThe model value of the file input.
Show exampleHide example
openOpens the native file input selector.
Show exampleHide example
removeRemoves a file from the input.
Show exampleHide example
previewReturns the preview DataURL of a file.
Show exampleHide example
dropHandles the drop event.