X Enterprises
Document

DocumentUploader

Drag-and-drop file upload zone with file type and size validation.

Document

The Document category provides a complete file management system — from drag-and-drop upload through grid/list browsing to in-browser preview. Components are composable: use XADocumentManager for a turnkey solution or assemble individual pieces for custom layouts.

Components

<XADocumentUploader />

A styled drag-and-drop upload zone. Validates file count and size before emitting. Shows an upload progress overlay when uploading is true.

<XADocumentUploader
  :multiple="true"
  accept="image/*,application/pdf"
  :max-size="10 * 1024 * 1024"
  :max-files="5"
  :compact="false"
  :uploading="isUploading"
  @upload="handleFiles"
  @error="handleError"
/>

Props

PropTypeDefaultDescription
multipleBooleantrueAllow multiple file selection
acceptString'*'Accepted MIME types or extensions
acceptLabelString''Human-readable accept label shown in UI
maxSizeNumber262144000Max file size in bytes (250 MB)
maxFilesNumbernullMax number of files per upload
compactBooleanfalseCompact mode for smaller spaces
disabledBooleanfalseDisable uploads
uploadingBooleanfalseShow upload progress overlay

Emits

EventPayloadDescription
uploadFile[]Valid files ready for upload
error{ type, message }Validation error (size/count exceeded)

AI Context

component: XADocumentUploader
package: "@xenterprises/nuxt-x-app"
auto-import: true
prefix: XA
category: Document
use-when: Providing a drag-and-drop file upload zone with file type and size validation. Emits validated File[] on upload. Use standalone or as part of XADocument.
Copyright © 2026