Skip to content
Theme:

Ui3nDropFiles ​

Component for drag & drop file uploading. Displays a drop zone that appears when files are dragged over the container.

Props

NameTypeDefaultDescription
namestring | undefined —

HTML name attribute for form submission

titlestring | undefined"Upload"

Drop files title

textstring | undefined""

Drop files text

additionalTextstring | undefined""

Additional text

permanentDisplayboolean | undefinedfalse

Whether to permanently display the component

Events

Event NameArguments / Value TypeDescription
selectfileList: FileList —

Slots

Slot NameScope Props (v-slot)Description
#default —

Default slot

#additional-text —

Additional text slot

Public Methods & Exposes

Method NameSignature / TypeDescription
clear()() => void —

CSS Variables

Set any of these where you need it — on :root, on a container, or on the element itself through [data-ui3n] — and the component follows. Leave them alone and it uses the defaults below.

NameDefault
--ui3n-dropzone-border-radius4px
--ui3n-dropzone-height0
--ui3n-dropzone-title-font0

Usage Examples ​

Basic usage ​

Basic usage

Simple drop zone that appears on drag enter. Drop files to trigger the select event.

Permanent display with additional text slot ​

Permanent display

Drop zone is always visible using the permanentDisplay prop. Additional text can be provided via the additional-text slot.

Drop files here

Drag & drop files or click to select