FileInput
Native file input with drop zone
A form field that takes files: click or drop, see what was picked, remove one. Submits with the form like any other field. When the files start uploading the moment they land — progress, retry, a queue — that is Uploader.
Basic
labelhere is the copy inside the zone. The field's own label comes from aBlessFieldaround it, which also wires id, invalid and describedby.acceptfilters the picker and dropped files, so the hint you write is what gets in.- The
v-modelis the truth. Withmultiple, picks accumulate and remove is per file, which the native<input>cannot mirror — on submit, appendfilesto yourFormDatarather than reading the input.
Usage
ts
import { BlessFileInput } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
id | string | — | |
accept | string | — | |
multiple | boolean | — | |
disabled | boolean | — | |
invalid | boolean | — | |
label | string | "Drop files here or click to browse" | drop zone copy |
hint | string | — | |
list | boolean | true | show the chosen files under the zone |
modelValue | File[] | [] |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: File[]] |
Slots
| Name | Scope | Description |
|---|---|---|
icon | — | |
default | — |