interface DropzoneProps {
    accept?: Accept;
    backgroundColor?:
        | "primary"
        | "blue5"
        | "white"
        | "textFaded"
        | "navigation"
        | "navigationTop"
        | "navigationSide"
        | "background"
        | "drawer"
        | "cards"
        | "cardDivider"
        | "cardSectionSeparator"
        | "fieldsOnCard"
        | "fieldsFloating"
        | "buttonSecondary"
        | "iconsDisabled"
        | "red"
        | "orange"
        | "greenDark"
        | "greenLight"
        | "text"
        | "redDark"
        | "orangeDark"
        | "greenDark2"
        | "blueDark"
        | "lineColor"
        | "iconButtonBg";
    children?: ReactNode;
    disableClick?: boolean;
    multiple?: boolean;
    onDrop: (acceptedFiles: File[]) => void;
    onReject?: (fileRejections: FileRejection[]) => void;
    sx?: SxProps<Theme>;
}

Properties

accept?: Accept

File types to accept

backgroundColor?:
    | "primary"
    | "blue5"
    | "white"
    | "textFaded"
    | "navigation"
    | "navigationTop"
    | "navigationSide"
    | "background"
    | "drawer"
    | "cards"
    | "cardDivider"
    | "cardSectionSeparator"
    | "fieldsOnCard"
    | "fieldsFloating"
    | "buttonSecondary"
    | "iconsDisabled"
    | "red"
    | "orange"
    | "greenDark"
    | "greenLight"
    | "text"
    | "redDark"
    | "orangeDark"
    | "greenDark2"
    | "blueDark"
    | "lineColor"
    | "iconButtonBg"

Optional background color for the dropzone

children?: ReactNode

Optional custom text or component shown inside the dropzone

disableClick?: boolean

Whether to disable click-to-upload

multiple?: boolean

Allow multiple file selection

onDrop: (acceptedFiles: File[]) => void

Callback fired when files are dropped

onReject?: (fileRejections: FileRejection[]) => void

Optional callback fired when files are rejected

sx?: SxProps<Theme>

Optional additional styling for the dropzone