X Enterprises
nuxt-x-formkit

File Upload Input

FormKit custom input type for drag-and-drop or click-to-browse file selection with preview.

File Upload Input

The file-upload FormKit input type renders a drag-and-drop upload zone with click-to-browse fallback, file type filtering, size limits, and thumbnail previews for images. Auto-registered by the layer.

Components

<FormKit type="file-upload" />

<FormKit
  type="file-upload"
  name="avatar"
  label="Profile Photo"
  accept="image/*"
  :max-size="2"
  :multiple="false"
  validation="required"
/>

Props

PropTypeDefaultDescription
namestringrequiredFormKit field name; value is a File or File[]
labelstringVisible field label
acceptstring'*'MIME type filter (e.g. 'image/*', '.pdf,.doc')
multiplebooleanfalseAllow multiple file selection
maxSizenumberMaximum file size in MB per file
validationstringFormKit validation rules
previewbooleantrueShow image thumbnail previews after selection

AI Context

component: FormKit type="file-upload"
package: "@xenterprises/nuxt-x-formkit"
use-when: File or image upload fields in FormKit forms with drag-and-drop and preview support
Copyright © 2026