Examples
Text file with restrictions
Only .txt up to 1 KB; larger files are rejected with a danger helper. Always re-validate server-side.
Documentation
Simple file upload props
Parameters accepted by
{#include components/forms/simple-file-upload ... /}.
| Name | Type | Description |
|---|---|---|
* id
|
String | DOM id. |
browseText / clearText
|
String |
Custom button labels. Defaults "Browse..." /
"Clear".
|
disabled
|
boolean | Disables both buttons. |
Usage
Visual scaffolding only. The runtime template renders the PF styling but doesn't include a real
<input type="file">. Wire it: add a hidden file input, point Browse at it via
@click, and bind the filename input to the chosen file via Alpine.