Default

No file selected
<FileInput label="Upload file" />

Description & placeholder

Accepted formats: JPG, PNG, WebP. Max size 5 MB.

Choose an image...
<FileInput
  label="Profile photo"
  description="Accepted formats: JPG, PNG, WebP. Max size 5 MB."
  placeholder="Choose an image..."
  accept="image/*"
/>

Multiple files

Choose files...
<FileInput label="Attachments" multiple placeholder="Choose files..." />

Accept filter

Choose an image...
Choose a PDF...
Choose a CSV...
<FileInput label="Images" accept="image/*" />
<FileInput label="PDFs" accept=".pdf" />
<FileInput label="CSV" accept=".csv,text/csv" />

Required & error

No file selected
No file selected

Please select a file before continuing

<FileInput label="Required upload" withAsterisk />
<FileInput label="With error" error="Please select a file before continuing" />

Size

No file selected
No file selected
No file selected
No file selected
No file selected
<FileInput size="xs" label="Extra small" />
<FileInput size="sm" label="Small" />
<FileInput size="md" label="Medium" />
<FileInput size="lg" label="Large" />
<FileInput size="xl" label="Extra large" />

Props

PropTypeDefaultDescription
labelchildrenField label rendered above the input
descriptionchildrenHelper text below the label
errorchildren|booleanError message or true for styles only
acceptstringMIME types or extensions the picker accepts
multiplebooleanAllows selecting multiple files
capture'user'|'environment'Mobile camera source
placeholderstring'No file selected'Text shown when no file is chosen
disabledbooleanPrevents interaction
requiredbooleanMarks the field required
withAsteriskbooleanShows asterisk without native required
size'xs'|'sm'|'md'|'lg'|'xl'Font size and height
radius'xs'|'sm'|'md'|'lg'|'xl'|stringCorner radius
namestringForm field name
idstringAssociates label with input