Skip to content
On this page

Upload

Upload one or more files

Base

Show code

Drag&Drop

Show code

Class props


How does Class props inspector work?
Class propDescriptionPropsSuffixes
disabledClassUpload class when disabled.disabled
draggableClassUpload class when draggable.dragDrop
expandedClassUpload class when expanded.expanded
hoveredClassUpload class on dragging.
👉 Drag & drop a file to see it in action!
dragDrop
rootClassRoot class of the element.
variantClassClass of the upload variant.
👉 Drag & drop a file to see it in action!
variant
dragDrop
primary
info
warning
danger


Props

Prop nameDescriptionTypeValuesDefault
acceptSame as native acceptstring-
autocompleteNative options to use in HTML5 validationstring-
disabledSame as native disabledboolean-
dragDropAccepts drag & drop and change its styleboolean-
expandedUpload will be expanded (full-width)boolean-false
iconIcon name to be addedstring-
iconPackIcon pack to usestringmdi, fa, fas and any other custom icon pack
maxlengthSame as native maxlength, plus character counternumber|string-
multipleSame as native, also push new item to v-model instead of replacingboolean-
nativeReplace last chosen files every time (like native file input element)boolean-false
overrideboolean-
roundedMakes the element roundedboolean-
statusIconShow status icon using field and variant propboolean-
From config

{
   "statusIcon": true
}
useHtml5ValidationEnable html 5 native validationboolean-
From config

{
   "useHtml5Validation": true
}
v-modelobject|File|array-
validationMessageThe message which is shown when a validation error occursstring-
variantColor of the control, optionalstringprimary, info, success, warning, danger, and any other custom color

Events

Event namePropertiesDescription
blur
focus
invalid
update:modelValue

Slots

NameDescriptionBindings
default

Style

📄 Full scss file

CSS VariableSASS VariableDefault
--oruga-upload-draggable-border$upload-draggable-border1px dashed $grey-light
--oruga-upload-draggable-border-radius$upload-draggable-border-radius$base-border-radius
--oruga-upload-draggable-disabled-opacity$upload-draggable-disabled-opacity$base-disabled-opacity
--oruga-upload-draggable-hover-border-color$upload-draggable-hover-border-color$grey
--oruga-upload-draggable-padding$upload-draggable-padding0.25em

Released under the MIT License.