Hex Core JS
    Preparing search index...

    Type Alias FileInputProps

    FileInputProps: {
        accept?: string | string[];
        autoFocus?: boolean;
        autoOpenImageEditor?: boolean;
        disabled?: boolean;
        draggingClassName?: string;
        id?: string;
        imageEditorOptions?: ImageEditorOptions;
        imagePreviewSizing?: FileInputPreviewProps["imageSizing"];
        invalid?: boolean;
        isLoading?: boolean;
        isUploading?: boolean;
        menuClassName?: string;
        menuImageEditorButtonContainerClassName?: string;
        menuStatusClassName?: string;
        name?: string;
        noImageEditor?: boolean;
        onBlur?: () => void;
        onFocus?: () => void;
        setValue: (value: FileFieldValue) => void;
        sideEffect?: (v: FileFieldValue) => void;
        value: FileFieldValue;
    } & Partial<ClassNameProps & StyleProps>

    Type Declaration

    • Optionalaccept?: string | string[]

      Defines the file types that the input should accept.

    • OptionalautoFocus?: boolean

      Indicates if the input should be auto-focused.

    • OptionalautoOpenImageEditor?: boolean

      Indicates if the image editor should automatically open when an image file is input.

      This prop is ignored if crop is required (ImageEditorOptions.requireCrop).

    • Optionaldisabled?: boolean

      Indicates if the input is disabled.

    • OptionaldraggingClassName?: string

      A CSS class name to apply when the user drags a file over the input.

    • Optionalid?: string

      The ID of the input.

    • OptionalimageEditorOptions?: ImageEditorOptions

      The options to pass to the image editor (if image editor is enabled).

    • OptionalimagePreviewSizing?: FileInputPreviewProps["imageSizing"]

      Image sizing in the preview if an image file is input.

    • Optionalinvalid?: boolean

      Indicates if the input is invalid.

    • OptionalisLoading?: boolean

      Indicates if the value is loading before being given to the input.

    • OptionalisUploading?: boolean

      Indicates if the file is uploading.

    • OptionalmenuClassName?: string

      A CSS class name to apply to the menu shown below the input.

    • OptionalmenuImageEditorButtonContainerClassName?: string

      A CSS class name to apply to the container for the image editor button in the menu.

    • OptionalmenuStatusClassName?: string

      A CSS class name to apply to the status (loading, "No File", or file name) in the menu.

    • Optionalname?: string

      The name of the input.

    • OptionalnoImageEditor?: boolean

      Indicates the the image editor should be disabled for image uploads.

    • OptionalonBlur?: () => void

      A callback function to call when focus is removed from the input.

    • OptionalonFocus?: () => void

      A callback function to call when the input becomes focused.

    • setValue: (value: FileFieldValue) => void

      A callback function to update the input value when a change happens.

    • OptionalsideEffect?: (v: FileFieldValue) => void

      A side effect function to call when the value changes as a result of user interaction with this input, and not external updates to the field value.

    • value: FileFieldValue

      The value of the input.