Browse components

ImageUpload

File input with an image preview, an accept filter and a clear control.

molecules

Live example

Default usage you can copy and adapt.

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

Props

The props you are most likely to need, with types and defaults.

Props / API
NameTypeRequiredDefaultDescription
valuestring | nullNonullData URL of the selected image. Bindable.
acceptstringNoimage/*File types the picker offers.
placeholderstringNoNo image selectedText shown before a file is chosen.
disabledbooleanNofalseDisable choosing and clearing.
errorMessagestringNo—Message shown beneath the preview.
onfileselect(detail: ImageUploadFileDetail) => voidNo—Runs with the chosen file's details.