Props
| Name | Description |
|---|---|
accept Type: string[] | File filter: MIME types ( Validated on picker and drop paths. Takes MIME types, wildcards, |
autofocus Type: Booleanish | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
disabled Type: booleanDefaultfalse | Disables the field: no pick, no drop, and a Use while an application-owned upload is active so the selection cannot change mid-request. There is no |
errors Type: string | string[] | Error messages under the field, a string or array, in an Does not fill itself from |
formless Type: booleanDefaultfalse | Keep this control out of the enclosing |
hasErrors Type: booleanDefaultfalse | The error state ( |
hasWarnings Type: booleanDefaultfalse | The warning state without a message; errors take priority. |
hideLabel Type: booleanDefaultfalse | Hides the label visually; it still names the control. Use it when the slot already carries a visible headline: the label still names the file input. See example |
hint Type: string | Helper line under the field, shown while the field has focus (always, with |
id Type: string | The Set it to open the mounted field from another button with |
label requiredType: string | The field's label: its |
maxFiles Type: number | Most files held. Unset: no limit. Caps the existing and incoming selection together. Past the cap a new file is rejected, never swapped in; one file is |
maxSize Type: number | Largest file, in bytes. A per-file limit in bytes. Rejected files never enter the model. See example |
modelValue Type: File[] | The files held: only files that passed the rules. A pick or drop appends to it. |
name Type: string | The name the files post under in a native form submit (a hidden input mirrors the value), and the field's key in a Outside a form it renders the hidden input a native multipart post needs (v2 rendered that input unconditionally). Inside a |
persistentHint Type: booleanDefaultfalse | Keeps the hint displayed. |
pt Type: (PtCompoundOf<"", { readonly parts: readonly ["root", "label", "content", "message", "hint"]; readonly states: readonly ["hasValue", "readonly", "disabled", "warnings", "errors", "active"]; readonly wide: readonly ["hasValue", "readonly", "disabled", "warnings", "errors", "active"]; }> & PtMap<BbDropzonePtPart, BbDropzonePtState>) | Passthrough, object form: the same keys as the |
pt:<part> Type: PtValue | Passthrough, attribute form: one attribute per part, |
readonly Type: booleanDefaultfalse | Shows the files; the user cannot change them: drop, the file picker and Your slot renders the file list: hide its remove and Browse buttons with the slot's |
rules Type: RuleExpression<File[]> | vee-validate rules for this field. Only inside a Checks the accepted files only: type, size and count rejections never reach the model, so they arrive through |
validationLabel Type: string | The field's name in validation messages ( Rule messages already use the |
validationMode Type: ValidationMode | When the field validates: |
warnings Type: string | string[] | Warning messages under the field, a string or string array: amber, in their own |
v-model
Values kept in sync through v-model.
| Name | Description |
|---|---|
modelValue Type: File[] | Contains validated files only. Upload progress, cancellation, retry, and server errors remain application-owned state. See example |
Events
| Name | Description |
|---|---|
blur Type: (event: FocusEvent): void | Emitted when the file input loses focus. Forwards the original DOM |
error Type: (rejections: BbFileRejection[]): void | Emitted once per drop or pick that rejected any file, AFTER that gesture's Emits once per drop or pick that rejected anything, after its |
focus Type: (event: FocusEvent): void | Emitted when the file input receives focus. Forwards the original DOM |
update:modelValue Type: (value: File[]): void | Emitted when a pick or drop accepted files: the held files with the new ones appended. A gesture that accepted nothing emits none. |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
default Type: BbDropzoneDefaultSlotProps | The area: free content, no design of its own. A click anywhere in it opens the picker, except on a real button or link; a file dropped on it is taken. The only visible surface: no fallback content. The area: a click anywhere opens the picker except on a real button or link, so a Browse |
hint Type: CommonFieldLabelSlotProps | Replaces the hint text; alone it still renders the row. |
label Type: CommonFieldLabelSlotProps | Replaces the label text. |
Renamed and removed
Names from v2 and from earlier 3.0 betas that no longer work, and what to write instead.
hasWarninghasWarningsfails silentlymaxmaxFilesfails silentlyThe count limit is
max-files(besidemax-size); a file past it is rejected, never swapped in.multipleremovedfails silentlyThe value is always a
File[]and takes many files by default; a one-file field is:max-files="1"(readfiles[0])tagremovedfails silentlyThe field's root is always a
<div>(the field frame: label, area, hint, messages)validateOnvalidationModefails silentlyAn array of events became one mode (
aggressive|balanced|lazy|submit-only|submit-live). The old defaults (['blur'],['inactive'], a toggle's['update:modelValue', 'change', 'blur']) arebalanced, the new default: delete the prop. A text field on['update:modelValue']isvalidation-mode="aggressive". Set it once on<BbForm validation-mode>instead of per field.vidremovedfails silentlyA display name (v2:
vid="Email address") is nowvalidation-label; a field path (3.0 betas:vid="address.city") is nowname(brackets for a native post:address[city]).check --fixpicks by the value.