Skip to Content
ComponentsInputFileUpload

FileUpload

Click-or-drop upload control. Manages a File[] list (controlled via files or uncontrolled); maxSize rejects files larger than the given byte count.

Click to upload or drag and dropPNG or JPG, up to 2 MB
import { FileUpload } from '@gg-software/ui'; <FileUpload accept="image/*" multiple maxSize={2 * 1024 * 1024} hint="PNG or JPG, up to 2 MB" onChange={(files) => setFiles(files)} />;

Props

PropTypeDefaultDescription
acceptstring—
multiplebooleanfalse
disabledbooleanfalse
filesFile[]—
defaultFilesFile[][]
onChange((files: File[]) => void)—
maxSizenumber—reject files larger than this many bytes
hintReactNode—
classNamestring—
idstring—
namestring—

* required · generated from packages/ui/src/input/FileUpload/FileUpload.tsx