Slate

File Input

A styled file upload control that mirrors the progressive form API of input. Shows the selected filename after choosing a file.

Usage

PDF, DOC, or DOCX up to 10 MB.

example.blade.php
<x-slate::file-input label="Upload document" description="PDF, DOC, or DOCX up to 10 MB." />

Accept and multiple

Pass native attributes through — they land on the underlying <input type="file">.

PNG or SVG. Multiple files allowed.

example.blade.php
<x-slate::file-input
    label="Assets"
    description="PNG or SVG. Multiple files allowed."
    accept=".png,.svg,image/png,image/svg+xml"
    multiple
/>

With error

Use errorMessage for static demos or Livewire validation.

Please select an image file.

example.blade.php
<x-slate::file-input
    label="Avatar"
    error-message="Please select an image file."
/>
Last updated .