Booting Environment...

File Upload

A comprehensive, headless file upload component with drag & drop, rich validation, and multi-state progress tracking.

Installation

npx raya-ui@latest add file-upload

File Structure

your-project
components
ui
file-upload
FileUpload.vue
FileUploadDropzone.vue
FileUploadList.vue
FileUploadItem.vue
...

API Reference

FileUpload Props

v-model
File[]
[]

Array binding for the selected files.

accept
string

Native HTML accept attribute (e.g., "image/*").

max-files
number

Limits the total number of selectable files.

on-validate
(file: File) => string | null

Custom validation function. Return an error string to reject a file, or null to accept it.

on-upload
Function

Callback that provides onProgress, onSuccess, and onError handlers for tracking async uploads.

Drag & drop files here

Or click to browse (max 2 files)

Settings