Lucent UI
DataTableFileUploadPageLayout
✦ LLM-ready

FileUpload

molecule

Drag-and-drop file upload zone with file list, progress tracking, error display, and size validation.

"Add a FileUpload from lucent-ui that accepts images up to 5 MB. Show progress bars and allow multiple files. Handle onError for size validation feedback."

Usage

React / JSX
import { FileUpload } from 'lucent-ui'

<FileUpload />

Installation

pnpm add lucent-ui

API Reference

FileUpload props — * required

PropTypeDefaultDescription
value*UploadFile[]Controlled list of UploadFile objects.
onChange*(files: UploadFile[]) => voidCalled when the file list changes.
acceptstringAccepted MIME types, e.g. "image/*" or ".pdf".
multiplebooleanfalseAllow multiple file selection.
maxSizenumberMaximum file size in bytes.
onError(error: string) => voidCalled when a file exceeds maxSize.
disabledbooleanfalseDisables the upload zone.
styleReact.CSSPropertiesInline styles for the wrapper.