Basic Upload
Simple image upload
Choose an image
Click to choose a file
With Restrictions
Upload with size and type restrictions
Choose an image
Click to choose a file
File input with an image preview, an accept filter and a clear control.
Default usage you can copy and adapt.
Simple image upload
Choose an image
Click to choose a file
Upload with size and type restrictions
Choose an image
Click to choose a file
The props you are most likely to need, with types and defaults.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| value | string | null | No | null | Data URL of the selected image. Bindable. |
| accept | string | No | image/* | File types the picker offers. |
| placeholder | string | No | No image selected | Text shown before a file is chosen. |
| disabled | boolean | No | false | Disable choosing and clearing. |
| errorMessage | string | No | — | Message shown beneath the preview. |
| onfileselect | (detail: ImageUploadFileDetail) => void | No | — | Runs with the chosen file's details. |