Props
| Name | Type | Default | Description |
|---|---|---|---|
accept | string[] | undefined | - | Array of MIME types ( Validated on picker and drop paths. Pair a MIME type with its extension when the operating system may leave |
autofocus | Booleanish | undefined | - | Sets autofocus on page load. |
disabled | boolean | undefined | false | Disables the component Use while an application-owned upload is active so the selection cannot change mid-request. There is no |
errors | string | string[] | undefined | - | Can be a string or an array of string containing the messages to display.
They render in an Does not fill itself from |
hasErrors | boolean | undefined | false | Define if the component should be in an error state. It usually attaches a CSS class for styling purposes. |
hasWarnings | boolean | undefined | false | Define if the component should be in a warning state.
Same chrome as errors with |
id | string | undefined | - | The identifier of the component. |
maxFiles | number | undefined | - | Maximum number of acceptable files. Caps the existing and incoming selection together, and only applies in multiple mode. See example |
maxSize | number | undefined | - | Max size of the files in bytes. A per-file limit in bytes. Rejected files never enter the model. See example |
modelValuerequired | File | File[] | null | - | Used by v-model. |
multiple | boolean | undefined | false | Allows the selection of multiple items. Changes both behavior and model shape: single mode replaces |
name | string | undefined | - | Defines the name of the input. Required only for a native multipart post. In v3 the hidden submittable input is absent when |
pt | PtMap<BbDropzonePtPart, BbDropzonePtState> | undefined | - | Passthrough, object form: the same keys as the |
pt:content | PtValue | undefined | - | |
pt:content:active | PtValue | undefined | - | |
pt:content:disabled | PtValue | undefined | - | |
pt:content:errors | PtValue | undefined | - | |
pt:content:warnings | PtValue | undefined | - | |
pt:message | PtValue | undefined | - | |
pt:message:active | PtValue | undefined | - | |
pt:message:disabled | PtValue | undefined | - | |
pt:message:errors | PtValue | undefined | - | |
pt:message:warnings | PtValue | undefined | - | |
pt:root | PtValue | undefined | - | |
pt:root:active | PtValue | undefined | - | |
pt:root:disabled | PtValue | undefined | - | |
pt:root:errors | PtValue | undefined | - | |
pt:root:warnings | PtValue | undefined | - | |
tag | LayoutTag | undefined | "div" | Element rendered as the component's wrapper. |
warnings | string | string[] | undefined | - | Warning messages to display beneath the dropzone, in their own |
v-model
Values kept in sync through v-model.
| Name | Type | Description |
|---|---|---|
modelValue | File | File[] | null | Contains validated files only. Upload progress, cancellation, retry, and server errors remain application-owned state. See example |
Events
| Name | Type | Description |
|---|---|---|
blur | (event: "blur", event: FocusEvent): void | |
error | (event: "error", data: DropZoneError): void | Emits once per rejected file with a discriminated |
focus | (event: "focus", event: FocusEvent): void | |
update:modelValue | (event: "update:modelValue", value: File | File[] | null): void |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Type | Description |
|---|---|---|
default | BbDropzoneDefaultSlotProps | The drop zone area content. Renders inside the The visible drop surface. Put |
Changes from v2
Props removed or renamed in 3.0. If you are coming from v2, the answer is here.
hasWarninghasWarningsfails silently