File upload
A drag-and-drop file upload zone.
Multiple
Image preview
Files the record already holds
avatar.webp41.2 KB- contract-2026.pdf180.0 KB
With progress
report-q2.pdf70%
API reference
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
multiple | boolean | false | Whether multiple files can be selected and accumulated. |
accept | string | '' | Comma-separated list of accepted file types (the `accept` attribute). |
name | string | '' | Native `name` attribute for the file input. |
hint | string | '' | Optional helper text shown under the dropzone label. |
disabled | boolean | false | Whether the upload zone is disabled. |
value | BuiFileUploadSource | null | The file(s) the record already holds — a URL, a list of URLs, or descriptors. Each becomes an ordinary row: same thumbnail, same name and size, same remove button. Removing one reports rather than withdrawing anything; the file belongs to your record, so dropping it from `value` is yours to do. |
dropzoneLabel | string | — | Custom dropzone prompt text. |
removeLabel | string | — | Custom accessible label for each remove button. |
Outputs
| Event | Payload | Description |
|---|---|---|
filesChange | readonly File[] | Emitted with the picked files whenever the selection changes. Stored files are not in it. |
fileRemove | BuiFileUploadRemoval | Emitted when the remove button on a row that came from `value` is pressed. |
Types
BuiFileUploadRemoval — What reports when a stored file's row is removed.
| Field | Type | Description |
|---|---|---|
url | string | The `url` of the row that was removed. |
name | string | The name that row was showing. |
BuiFileUploadSource — Everything `value` accepts: one URL, one descriptor, or a list of either.
string | BuiFileUploadValue | readonly (string | BuiFileUploadValue)[]BuiFileUploadValue — A file the consumer's record already holds — an avatar, a logo, an attachment saved last week.
It is the field's *current value*, which is the one thing a file input cannot express: the
native control carries what is being picked now, never what was picked before.
| Field | Type | Description |
|---|---|---|
url | string | Where the stored file lives. Doubles as the thumbnail source for an image. |
name? | string | Row label. Defaults to the last path segment of `url`. |
size? | number | Size in bytes, when the record knows it. A row without one shows no size. |
image? | false | true | Render `url` as a thumbnail. Inferred from the extension when left unset. |
Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.