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
| Prop | Type | Default | Description |
|---|---|---|---|
accept | string | — | |
multiple | boolean | false | |
disabled | boolean | false | |
files | File[] | — | |
defaultFiles | File[] | [] | |
onChange | ((files: File[]) => void) | — | |
maxSize | number | — | reject files larger than this many bytes |
hint | ReactNode | — | |
className | string | — | |
id | string | — | |
name | string | — |
* required · generated from packages/ui/src/input/FileUpload/FileUpload.tsx