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 documentation of the FileUpload element

Basic usage

With picture

Is uploaded

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

When to use

Use wje-file-upload-item when users need to enter values, choose options, or trigger form-related actions.

When not to use

Do not use it as a decorative element without interaction. Prefer presentational components in that case.

Accessibility

Always provide a label (label/aria-label), keep keyboard support, and surface clear validation feedback.

Best Practices

  • Keep validation rules and error behavior consistent across the entire form.
  • Show loading or disabled states during async operations.
  • Split complex forms into smaller sections with immediate feedback.

Attributes and Properties

uploaded

DescriptionIndicates whether the file item is already uploaded.
Attributeuploaded
Typeany
Default-

isUploaded

DescriptionChecks if the 'is-uploaded' attribute is present on the element.
Attributeis-uploaded
Typeboolean
Default-

Events

NameDescription
wje-button:clickDispatches when the delete button is clicked.
wje-file-upload-item:removeEmitted when the wje-file-upload-item:remove event is dispatched.

Methods

No public methods available for this component.

CSS Shadow Parts

NameDescription
buttonThe delete button part.
imageThe image part.
nameThe name part.
sizeThe size part.

CSS Custom Properties

NameDescription
--primary-colorThe primary color of the file upload item.

Slots

NameDescription
imgSlot for the image.
actionSlot for the action buttons.