Skip to content

Upload

Upload one or more files

Examples

Base

Show code

Drag&Drop

Show code

Disabled

Show code

Variants

Show code

Class props

'Classes applied to the element'

Upload component

Upload one or more files

html
<o-upload></o-upload>

Props

Prop nameDescriptionTypeValuesDefault
accept-
customValidity-""
disabled-false
dragDrop-false
expanded-false
v-model-
native-true
override-
useHtml5Validation-
From config:
{
  useHtml5Validation: true
}
variant-
From config:
upload: {
  variant: undefined
}

Events

Event namePropertiesDescription
update:modelValuevalue object | object[] | File | File[] - updated modelValue propmodelValue prop two-way binding
focusevent Event - native eventon input focus event
blurevent Event - native eventon input blur event
invalidevent Event - native eventon input invalid event

Slots

NameDescriptionBindings
defaultDefault contentonclick (event:Event): void - click handler, only needed if a button is used

Sass variables

Current theme ➜ Oruga

SASS VariableDefault
$upload-draggable-border1px dashed var(--#{$prefix}grey-light)
$upload-draggable-border-radiusvar(--#{$prefix}base-border-radius)
$upload-draggable-disabled-opacityvar( --#{$prefix}base-disabled-opacity)
$upload-draggable-hover-border-colorvar(--#{$prefix}grey)
$upload-draggable-padding0.25em

See ➜ 📄 Full scss file

Current theme ➜ Bulma

SASS VariableDefault
$upload-colorsfile.$file-colors
$upload-bgtransparent
$upload-draggable-padding0.5rem
$upload-border-colorcss.getVar("grey-light")

See ➜ 📄 Full scss file

Current theme ➜ Bootstrap

SASS VariableDefault
$upload-draggable-bgtransparent
$upload-draggable-bg-hovertransparent
$upload-draggable-border-colorvar(--#{$prefix}border-color)
$upload-draggable-border-color-hovervar(--#{$prefix}dark-bg-subtle)
$upload-draggable-border-widthvar(--#{$prefix}border-width)
$upload-draggable-border-radiusvar(--#{$prefix}border-radius)
$upload-draggable-padding2em
$upload-disabled-opacity0.5

See ➜ 📄 Full scss file

Released under the MIT License.