Upload
Upload one or more files
Class props
Upload component
Upload one or more files
html
<o-upload></o-upload>
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
accept | - | |||
customValidity | - | "" | ||
disabled | - | false | ||
dragDrop | - | false | ||
expanded | - | false | ||
v-model | - | |||
native | - | true | ||
override | - | |||
useHtml5Validation | - | From config: { | ||
variant | - | From config: upload: { |
Events
Event name | Properties | Description |
---|---|---|
update:modelValue | value object | object[] | File | File[] - updated modelValue prop | modelValue prop two-way binding |
focus | event Event - native event | on input focus event |
blur | event Event - native event | on input blur event |
invalid | event Event - native event | on input invalid event |
Slots
Name | Description | Bindings |
---|---|---|
default | Default content | onclick (event:Event): void - click handler, only needed if a button is used |
Sass variables
Current theme ➜ Oruga
SASS Variable | Default |
---|---|
$upload-draggable-border | 1px dashed var(--#{$prefix}grey-light) |
$upload-draggable-border-radius | var(--#{$prefix}base-border-radius) |
$upload-draggable-disabled-opacity | var( --#{$prefix}base-disabled-opacity) |
$upload-draggable-hover-border-color | var(--#{$prefix}grey) |
$upload-draggable-padding | 0.25em |
See ➜ 📄 Full scss file
Current theme ➜ Bulma
SASS Variable | Default |
---|---|
$upload-colors | file.$file-colors |
$upload-bg | transparent |
$upload-draggable-padding | 0.5rem |
$upload-border-color | css.getVar("grey-light") |
See ➜ 📄 Full scss file
Current theme ➜ Bootstrap
SASS Variable | Default |
---|---|
$upload-draggable-bg | transparent |
$upload-draggable-bg-hover | transparent |
$upload-draggable-border-color | var(--#{$prefix}border-color) |
$upload-draggable-border-color-hover | var(--#{$prefix}dark-bg-subtle) |
$upload-draggable-border-width | var(--#{$prefix}border-width) |
$upload-draggable-border-radius | var(--#{$prefix}border-radius) |
$upload-draggable-padding | 2em |
$upload-disabled-opacity | 0.5 |
See ➜ 📄 Full scss file