Skip to content

File Item ​

ue-file-item renders a single row in a file attachment table. It shows the file extension icon, name, size, and a remove button. It is used internally by file-upload form fields.

Usage ​

html
<table>
  <tbody>
    <ue-file-item
      v-for="file in files"
      :key="file.id"
      name="attachments[]"
      :item="file"
      :draggable="true"
    />
  </tbody>
</table>

Props ​

PropTypeDefaultDescription
nameStringrequiredThe name attribute for the hidden <input type="hidden"> that submits the file ID
itemObject{}File object. Supports id, name, size, extension, thumbnail, original keys
draggableBooleanfalseShow a drag handle cell for reordering
itemLabelString'Item'Label used in confirmation messages
endpointString''Delete endpoint — called when the remove button is clicked
maxNumber10Maximum number of files allowed (informational)

Behaviour ​

  • If item.extension is present, an SVG icon matching the extension is shown.
  • If item.thumbnail is present, a thumbnail <img> is shown alongside the file name.
  • Clicking the close button removes the row from the file list.