Input File

Drag and drop file upload component with preview.

Click to upload or drag and drop

Accepted formats: image/*

Click to upload or drag and drop

All files accepted

Max size 5MB

1<InputFile label="Upload Image" accept="image/*" />
2<InputFile label="With Helper Text" helperText="Max size 5MB" />

Installation

npx zeroui@latest add input-file

Props

nametypedefaultdescription
labelstring--
helperTextstring--
onFileSelect(file: File | null) => void--
acceptstring--