FileInput

The FileInput component allows users to upload files, supporting both a traditional input style and a dropzone style.

When To Use

  • When you need to upload one or more files.
  • When you need to upload files by dragging and dropping.

Drag and Drop

You can drag files to a specific area, to upload. Alternatively, you can also upload by selecting.

Upload by clicking

Classic mode. File selection dialog pops up when upload button is clicked.

Customize preview file

Customize local preview by using slots.

Validation & Parameters

You can gain full control over filelist by configuring parameters like max files and max size.

Upload png file only

Limit file types that can be accepted.

API

Property
Description
Type
Default

variant

Visual variant of the input 'input' | 'dropzone' 'input'

label

Label for the file input string ''

description

Description or help text string ''

multiple

Allow multiple file selection boolean false

maxFiles

Maximum number of files allowed number

maxSize

Maximum file size in MB number

acceptType

Predefined accepted file types 'images' | 'spreadsheets' | 'documents' | 'pdfs' | 'videos' | 'audios' | 'all' 'all'

placeholder

Placeholder text for input variant string 'Choose a file...'

error

Indicates an error state or displays an error message string | boolean

success

Indicates a success state or displays a success message string | boolean

disabled

Disables the component boolean false