File Upload
Native <input type="file"> + file:* inline utilities and dashed dropzone (large area). Multi-file with progress bar driven by Alpine—simulation flags make the demo self-running.
Minimal — inline picker (outline)
<x-file-upload color="primary" label="Primary — outline" />
<x-file-upload color="success" label="Success — outline" />
<x-file-upload color="warning" label="Warning — outline" />
<x-file-upload color="error" label="Error — outline" />
appearance=soft x color
<x-file-upload appearance="soft" color="primary" label="Primary — soft" />
<x-file-upload appearance="soft" color="success" label="Success — soft" />
<x-file-upload appearance="soft" color="warning" label="Warning — soft" />
<x-file-upload appearance="soft" color="error" label="Error — soft" />
size — sm / md / lg (inline)
<x-file-upload size="sm" label="size sm" />
<x-file-upload size="md" label="size md (default)" />
<x-file-upload size="lg" label="size lg" />
appearance=dropzone
<x-file-upload appearance="dropzone" color="primary" label="Cover image" description="PNG, JPG, WebP — max 5MB" accept="image/*" />
<x-file-upload appearance="dropzone" color="success" label="Documents" description="PDF, DOCX — max 10MB" accept=".pdf,.doc,.docx" />
multiple + simulate (simulated upload progress)
<x-file-upload
appearance="dropzone"
color="primary"
label="Documents (horizontal preview)"
description="Each file gets its own row with thumbnail, name, size, progress."
multiple
simulate
/>
<x-file-upload
appearance="outline"
color="info"
label="Inline picker (horizontal preview)"
description="Inline file input, multiple selection, progress runs to 100%."
multiple
simulate
/>
preview-layout=grid — square thumbnails
<x-file-upload
appearance="dropzone"
color="primary"
preview-layout="grid"
label="Photo gallery"
description="Pick several images — preview tiles fill in like a picture-card grid."
accept="image/*"
multiple
simulate
/>
<x-file-upload
appearance="outline"
color="success"
preview-layout="grid"
label="Mixed assets"
description="Images show thumbnails, other types show a generic file icon."
multiple
simulate
/>
Error state
<x-file-upload label="Profile photo" description="JPG / PNG only" error="Required — please choose a file" />
<x-file-upload appearance="dropzone" label="Receipt" description="PDF only" error="Required — please choose a file" />
disabled
<x-file-upload label="Disabled (inline)" disabled />
<x-file-upload appearance="dropzone" color="primary" label="Disabled (dropzone)" disabled />
on a base-200 surface
<x-file-upload appearance="dropzone" color="primary" label="Upload on a base-200 panel" multiple simulate />
browse-label / drop-hint — localized dropzone text
<x-file-upload
appearance="dropzone"
color="primary"
label="ID photo"
browse-label="Select a file…"
drop-hint="or drop it here"
description="PNG / JPG — max 5MB"
accept="image/*"
/>
file-upload-change event — Livewire in a teleported modal (code only)
{{-- wire:model does not work on a file input teleported to <body>
(as <x-modal> does) — listen for the bubbling file-upload-change
CustomEvent and hand the File objects to $wire.upload() instead. --}}
<x-file-upload
appearance="dropzone"
label="Photo"
accept="image/*"
x-on:file-upload-change="$wire.upload('photo', $event.detail.files[0])"
/>