Skip to content

FileUpload

Overview

A file-upload control with a hidden native file input, a styled trigger button, and an optional drag-and-drop zone. Emits the selected File via v-model.

Theme entry: FileUpload

Props

NameTypeRequiredDefaultDescription
iconOverrideObjectnullA partial icon registry ({ [componentName]: { [iconName]: { component, props } } }) merged with inherited and default icon entries; scopes icon overrides to this component and its descendants.
themeOverrideString|Object|ArraynullA partial theme object merged with the component's default theme; accepts a class string, class array, or theme object.
modelValueFile|objectnullThe currently selected File, or null.
acceptstring"*"MIME type filter passed to the native file input (e.g. "image/*" or ".pdf").
maxFileSizenumber1000000Maximum allowed file size in bytes. Files exceeding this limit are silently rejected.
disabledbooleanfalseWhen true, prevents interaction with the control.
dropzonebooleanfalseWhen true, renders a drag-and-drop zone around the trigger.
classimport('vue').HTMLAttributes['class']undefinedAdditional CSS classes to apply to the root element.
asstring|object"div"The element or component to render the root as.
asChildbooleanfalseWhen true, merges props onto the child element instead of rendering a wrapper.

Slots

default

Scoped slot.

Bindings

NameDescription
open
dragging

trigger-content

Slot.

drop-message

Slot.

Events

NameDescription
update:modelValueEmitted when the value changes.

Full event reference

Source

client/lib/controls/file-upload/FileUpload.vue

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2