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
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| iconOverride | Object | null | A partial icon registry ({ [componentName]: { [iconName]: { component, props } } }) merged with inherited and default icon entries; scopes icon overrides to this component and its descendants. | |
| themeOverride | String|Object|Array | null | A partial theme object merged with the component's default theme; accepts a class string, class array, or theme object. | |
| modelValue | File|object | null | The currently selected File, or null. | |
| accept | string | "*" | MIME type filter passed to the native file input (e.g. "image/*" or ".pdf"). | |
| maxFileSize | number | 1000000 | Maximum allowed file size in bytes. Files exceeding this limit are silently rejected. | |
| disabled | boolean | false | When true, prevents interaction with the control. | |
| dropzone | boolean | false | When true, renders a drag-and-drop zone around the trigger. | |
| class | import('vue').HTMLAttributes['class'] | undefined | Additional CSS classes to apply to the root element. | |
| as | string|object | "div" | The element or component to render the root as. | |
| asChild | boolean | false | When true, merges props onto the child element instead of rendering a wrapper. |
Slots
default
Scoped slot.
Bindings
| Name | Description |
|---|---|
| open | |
| dragging |
trigger-content
Slot.
drop-message
Slot.
Events
| Name | Description |
|---|---|
update:modelValue | Emitted when the value changes. |
Source
client/lib/controls/file-upload/FileUpload.vue