File upload
Drop files on the zone or browse for them. The component checks the type, size and count, previews images, shows each file with its size and status, and uploads them with progress.
Basic
One file at a time: the picked file takes the place of the zone, with Replace and Remove. accept and maxFileSize check it, description tells the user the rules.
Selected: nothing yet
Multiple
With multiple the zone stays and the files collect in a list below it, images with a preview. fileLimit caps the count.
Upload
customUpload hands the files to uploadHandler with progress, complete and fail callbacks — here a simulated server that refuses PDF files. Use url to send them as a FormData request instead.
Auto
auto uploads the files as soon as they are picked — no Upload button.
Validation
Files that break accept, maxFileSize or fileLimit are not added; the reasons show under the zone and come out of rejected — here also as a toast.
Basic mode
mode="basic" is a button with the chosen file name next to it — for a profile photo or an attachment field.
Form
A form control: the value is the File (or File[] with multiple). Inside tx-field the hint and the error describe the drop zone.
Templates
txFileUploadDropzone replaces the content of the empty zone, txFileUploadFile draws each file — here as chips.
Disabled
disabled turns off the zone, the dialog and dropping.
Design tokens
dt changes one upload — here a compact zone with a solid primary outline and round corners.