ObjectUIObjectUI

File Upload

Modern file upload component with drag-and-drop support

The File Upload component provides a futuristic interface for uploading files with visual feedback, progress indication, and multiple file support.

Basic Usage

Simple Upload

Choose files

Single vs Multiple

Single File

Select one file

Multiple Files

Select multiple files

File Type Restrictions

Images Only

Choose images

Schema

interface FileUploadSchema {
  type: 'file-upload';
  
  // Required
  id: string;                           // Field identifier
  
  // Configuration
  name?: string;                        // Field name for form submission
  label?: string;                       // Label text
  buttonText?: string;                  // Upload button text
  
  // File constraints
  accept?: string;                      // Accepted file types (e.g., 'image/*', '.pdf,.doc')
  multiple?: boolean;                   // Allow multiple files (default: false)
  maxSize?: number;                     // Maximum file size in bytes
  maxFiles?: number;                    // Maximum number of files (for multiple)
  
  // States
  disabled?: boolean;                   // Whether field is disabled
  
  // Help text
  description?: string;                 // Help text or description
  error?: string;                       // Error message
  
  // Styling
  className?: string;                   // Tailwind CSS classes
  wrapperClass?: string;                // Wrapper container classes
  
  // Base properties
  visible?: boolean | string;
  testId?: string;
}

Examples

Document Upload

Document Upload

Select documents

Profile Picture

Avatar Upload

Upload photo

Full Example

Form Example

Project Files

Drop files here or click to upload

On this page