Skip to content
File input - Web Component β
The FileInput component can be used imported from:
Playground β
Parameters β
The Web component uses the <z-file-input>
tag:
By default, all the parameters are optional or can be set in different, except for the ones marked as required
The parametrization of the component can be done with the following custom HTML params:
Name | Type | Description | Slot | A11y |
---|---|---|---|---|
config | string | The main parameter has two components following the pattern:
| ||
label | string | Label of the input | label | |
placeholder | string | Placeholder of the input | ||
readonly | boolean | Transforms the input into an output | ||
autocomplete | string | Automated assistance in filling out form field values | ||
model | string | Value of the model | ||
disabled | boolean | Blocks the interaction with the input component. | ||
required | boolean | Marks the input component as required. | ||
name | string | Identification for the field inside the form | ||
help-text | string | The forced message to be shown under the input | help-text | |
invalid | boolean | The forced state for set the input as invalid |
Events β
This component has events. Check the documentation about how to use the events.
Name | Payload | Description |
---|---|---|
change | Blob | Returns the file as a Blob |
restarted | void | Emitted on value reset |
Slots β
This component has slots. Check the documentation about how to use the slots.
Name | Tags | Description |
---|---|---|
label | span | |
help-text | span |
Parameters use β
...
locale
β
droppable
β
If accept
is used, a message with the accepted formats will be shown:
The locale
attribute will affect this last message on accept
:
Browser support β
Detected engine: Β
Chromium
Webkit
Gecko