Skip to main content

FileUpload Item

shadow

The FileUploadItem element represents an individual item (file) within the FileUpload component. Displays details such as file name, size, upload progress, and provides actions such as deleting the file. This component is intended to be used in the context of the FileUpload component.

For more information on using FileUploadItem, navigate to the [FileUpload] element documentation(./file-upload)

Basic usage

The preview shows one item of the uploaded file in its default state, i.e. as it will appear in the list when the file is selected.

With picture

The sample uses the image variant of file-upload-item to show how a preview item differs from a generic file.

Is uploaded

The is-uploaded attribute displays the element in the uploaded file state.

When to use

Use wje-file-upload-item when the user enters a value, selects options, or performs an action on a form.

When not to use

Don't just use it as a visual decorative element without interaction. In this case, give priority to the presentation components.

Accessibility

Always link the component to the description (label/aria-label), keep keyboard control, and display a clear message on validation errors.

  • Keep validation rules and error states consistent across the entire form.
  • For asynchronous operations, display the load status or disabled status.
  • For complex forms, prefer smaller sections and immediate feedback.

Attributes and properties

isUploaded

PopisUrčuje, či je voľba is-uploaded zapnutá a ovplyvňuje správanie komponentu.
Atribútis-uploaded
Typboolean
Predvolenéfalse

size

PopisNastavuje veľkosť komponentu.
Atribútsize
Typstring | number
Predvolené-

uploaded

PopisUrčuje, či je položka súboru už nahraná.
Atribútuploaded
Typany
Predvolené-

Events

NázovPopis
wje-button:clickVyvolá sa pri kliknutí na tlačidlo.
wje-file-upload-item:removeVyvolá sa pri odoslaní udalosti wje-file-upload-item:remove.

Methods

Pre tento komponent nie sú dostupné žiadne verejné metódy.

CSS shadow parts

NázovPopis
buttonŠtýluje shadow časť button.
imageŠtýluje shadow časť image.
nameŠtýluje shadow časť name.
sizeŠtýluje shadow časť size.

CSS custom variables

NázovPopis
--primary-colorVlastná CSS premenná, ktorá riadi primary color.

Slots

NázovPopis
imgSlot pre náhľad obrázka alebo iného média.
actionSlot pre akčné ovládacie prvky, napríklad tlačidlá.