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" />
Loading…
Couldn't load the HTML

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" />
Loading…
Couldn't load the HTML

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" />
Loading…
Couldn't load the HTML

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" />
Loading…
Couldn't load the HTML

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
/>
Loading…
Couldn't load the HTML

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
/>
Loading…
Couldn't load the HTML

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" />
Loading…
Couldn't load the HTML

disabled

<x-file-upload label="Disabled (inline)" disabled />
<x-file-upload appearance="dropzone" color="primary" label="Disabled (dropzone)" disabled />
Loading…
Couldn't load the HTML

on a base-200 surface

<x-file-upload appearance="dropzone" color="primary" label="Upload on a base-200 panel" multiple simulate />
Loading…
Couldn't load the HTML

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/*"
/>
Loading…
Couldn't load the HTML

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])"
/>
Loading…
Couldn't load the HTML