<orb-file-input
label="Upload a file!"
multiple
></orb-file-input>
| Description |
Comma-separated list of acceptable file types, such as image/* or .pdf |
| Attribute |
accept |
| Type |
string |
| Default |
undefined |
| Description |
On mobile devices, which camera to capture from. Only used when accept includes an image, video, or audio type. |
| Attribute |
capture |
| Type |
"environment" | "user" |
| Default |
undefined |
| Description |
Disables the control |
| Attribute |
disabled |
| Type |
boolean |
| Default |
false |
| Description |
The selected files |
| Attribute |
– |
| Type |
File[] |
| Default |
[] |
| Description |
Label that shows above the control |
| Attribute |
label |
| Type |
string |
| Default |
undefined |
| Description |
Allows more than one file to be selected |
| Attribute |
multiple |
| Type |
boolean |
| Default |
false |
| Description |
Name the files are submitted under with form data |
| Attribute |
name |
| Type |
string |
| Default |
undefined |
| Description |
Additional info that shows below the control |
| Attribute |
note |
| Type |
string |
| Default |
undefined |
| Description |
A promise that resolves when the component has completed it’s initial render |
| Attribute |
– |
| Type |
Promise<unknown> |
| Default |
new Promise((res) => (this.#resolve = res)) |
| Description |
Requires at least one file before the form can be submitted |
| Attribute |
required |
| Type |
boolean |
| Default |
false |
| Description |
Size of the control |
| Attribute |
size |
| Type |
"lg" | "md" | "sm" | "xs" |
| Default |
"md" |
| Description |
Emitted when files are added or removed |
| Type |
CustomEvent<void> |
| Description |
Emitted when files are added or removed |
| Type |
CustomEvent<void> |
| Description |
Clears custom errors and the user interaction state, so validation styling is hidden until the user interacts with the control again. |
| Signature |
resetValidity() => Promise<void> |
| Description |
Sets a custom validation error. Pass an empty string to clear it. |
| Signature |
setCustomValidity(message: string) => Promise<void> |
| Parameters |
message (string) |
| Part |
Description |
"dropzone" |
|
"dropzone-icon" |
|
"dropzone-text" |
|
"file" |
|
"file-details" |
|
"file-icon" |
|
"file-image" |
|
"file-list" |
|
"file-name" |
|
"file-size" |
|
"file-thumbnail" |
|
"remove-button" |
|
graph TD;
orb-file-input --> orb-label
orb-file-input --> orb-note
orb-file-input --> orb-card
orb-file-input --> orb-toolbar
orb-file-input --> orb-button
orb-button --> orb-loading
style orb-file-input fill:#f9f,stroke:#333,stroke-width:4px