# React file upload libraries

React file upload libraries let users pick or drop files and send them to a server or storage service. A selection library hands the chosen files to the application rather than uploading them itself. These libraries let apps accept documents, images, and media from users.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [react-dropzone](#react-dropzone) | 75.9M | 11.0K | Nov 2026 | MIT |
| [@rc-component/upload](#rc-component-upload) | 7.3M | 804 | Sep 2026 | MIT |
| [@uppy/react](#uppy-react) | 4.2M | 31.1K | Nov 2026 | MIT |
| [Mantine Dropzone](#mantine-dropzone) | 3.3M | 32.0K | Nov 2026 | MIT |
| [use-file-picker](#use-file-picker) | 1.1M | 303 | May 2025 | MIT |
| [React FilePond](#react-filepond) | 878.9K | 2.0K | Dec 2024 | MIT |
| [@uploadthing/react](#uploadthing-react) | 688.4K | 5.4K | Aug 2025 | MIT |
| [react-drag-drop-files](#react-drag-drop-files) | 557.8K | 270 | Jul 2025 | MIT |

Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[react-dropzone](#react-dropzone) has the most monthly downloads in this comparison, at 75.9M.

## Capabilities

| Library | HTTP uploads | File size limits | Image thumbnails |
| --- | --- | --- | --- |
| [react-dropzone](#react-dropzone) | No | Yes | No |
| [@rc-component/upload](#rc-component-upload) | Yes | No | No |
| [@uppy/react](#uppy-react) | Via plugin | Yes | Yes |
| [Mantine Dropzone](#mantine-dropzone) | No | Yes | No |
| [use-file-picker](#use-file-picker) | No | Yes | No |
| [React FilePond](#react-filepond) | Yes | Via plugin | Via plugin |
| [@uploadthing/react](#uploadthing-react) | Yes | Yes | Undocumented |
| [react-drag-drop-files](#react-drag-drop-files) | No | Yes | No |

## Libraries

### react-dropzone

[GitHub](https://github.com/react-dropzone/react-dropzone) · [npm](https://www.npmjs.com/package/react-dropzone) · [Docs](https://api.github.com/repos/react-dropzone/react-dropzone/contents/src/index.tsx)

Provides React hooks for file selection through drag-and-drop.

- Downloads / mo: 75.9M
- Stars: 11.0K
- Last release: 20.2.1
- License: MIT
- Capabilities: [From the react-dropzone docs](https://api.github.com/repos/react-dropzone/react-dropzone/contents/src/index.tsx)

**Strengths**

- **Customizes file-selection UI.** Use property getters to connect a custom drop area and input.
- **Accepts pasted files.** Pasted files follow the same validation and callbacks as dropped files.

**Watch out for**

- **Needs a separate uploader.** Connect a separate upload transport after selecting files.
- **Dropped files omit absolute paths.** Returned files omit path and fullPath properties.

```sh
npm install react-dropzone@20.2.1 react@19.2.0 react-dom@19.2.0
```

**supabase/supabase** (115.1K stars)

[supabase/supabase](https://github.com/supabase/supabase) 

```typescript
const Dropzone = ({
  className,
  children,
  getRootProps,
  getInputProps,
  ...restProps
}: PropsWithChildren<DropzoneProps>) => {
  const isSuccess = restProps.isSuccess
  const isActive = restProps.isDragActive
  const isInvalid =
    (restProps.isDragActive && restProps.isDragReject) ||
    (restProps.errors.length > 0 && !restProps.isSuccess) ||
    restProps.files.some((file) => file.errors.length !== 0)

  return (
    <DropzoneContext.Provider value={{ ...restProps }}>
      <div
        {...getRootProps({
          className: cn(
            'border-2 border-gray-300 rounded-lg p-6 text-center bg-card transition-colors duration-300 text-foreground',
            className,
            isSuccess ? 'border-solid' : 'border-dashed',
            isActive && 'border-primary bg-primary/10',
            isInvalid && 'border-destructive bg-destructive/10'
          ),
        })}
      >
        <input {...getInputProps()} />
        {children}
      </div>
    </DropzoneContext.Provider>
  )
}

```

[apps/ui-library/registry/default/blocks/dropzone/components/dropzone.tsx](https://github.com/supabase/supabase/blob/a66aa7417a73bad89d4c3340d6590d7ca9f01833/apps/ui-library/registry/default/blocks/dropzone/components/dropzone.tsx) · [More projects using react-dropzone →](https://dashboard.exa.ai/playground/search?q=React%20projects%20using%20react-dropzone%20for%20file%20uploads%2C%20custom%20dropzones%2C%20progress%2C%20presigned%20uploads%2C%20typed%20file%20routes%20and%20transfer%20cancellation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```typescript
import React from "react";
import { createRoot } from "react-dom/client";
import { useDropzone } from "react-dropzone";
function Picker() { const { getRootProps, getInputProps } = useDropzone({ onDrop: (files) => console.log(files) }); return <div {...getRootProps()}><input {...getInputProps()} />Drop or choose files</div>; }
const host = document.createElement("div"); document.body.append(host);
createRoot(host).render(<Picker />);

```

From [README.md](https://api.github.com/repos/react-dropzone/react-dropzone/contents/src/index.tsx)

### @rc-component/upload

[GitHub](https://github.com/react-component/upload) · [npm](https://www.npmjs.com/package/@rc-component/upload) · [Docs](https://api.github.com/repos/react-component/upload/readme)

Provides an upload UI component for React.

- Downloads / mo: 7.3M
- Stars: 804
- Last release: 1.2.0
- License: MIT
- Capabilities: [From the @rc-component/upload docs](https://api.github.com/repos/react-component/upload/readme)

```sh
npm install @rc-component/upload@1.2.0 react@19.2.0 react-dom@19.2.0
```

**ant-design/ant-design** (100.3K stars)

[ant-design/ant-design](https://github.com/ant-design/ant-design) 

```typescript
const handleRemove = (file: UploadFile) => {
  let currentFile: UploadFile;
  Promise.resolve(isFunction(onRemove) ? onRemove(file) : onRemove).then((ret) => {
    // Prevent removing file
    if (ret === false) {
      return;
    }

    const currentFileList = getMergedFileList();
    const removedFileList = removeFileItem(file, currentFileList);

    if (removedFileList) {
      currentFile = { ...file, status: 'removed' };
      currentFileList.forEach((item) => {
        const matchKey = currentFile.uid !== undefined ? 'uid' : 'name';
        if (item[matchKey] === currentFile[matchKey] && !Object.isFrozen(item)) {
          item.status = 'removed';
        }
      });
      uploadRef.current?.abort(currentFile as RcFile);

      onInternalChange(currentFile, removedFileList);
    }
  });
};

```

[components/upload/Upload.tsx](https://github.com/ant-design/ant-design/blob/ee8db7734e6a4d2387a55324e7e35eecb5535e72/components/upload/Upload.tsx) · [More projects using @rc-component/upload →](https://dashboard.exa.ai/playground/search?q=%40rc-component/upload%20GitHub%20projects)

**Quickstart**

```typescript
import React from "react";
import { createRoot } from "react-dom/client";
import Upload from "@rc-component/upload";
const host = document.createElement("div"); document.body.append(host);
createRoot(host).render(<Upload action="/upload" onSuccess={(body) => console.log(body)}><button type="button">Choose and upload</button></Upload>);

```

From [README.md](https://api.github.com/repos/react-component/upload/readme)

### @uppy/react

[GitHub](https://github.com/transloadit/uppy) · [npm](https://www.npmjs.com/package/@uppy/react) · [Docs](https://uppy.io/docs/react/)

Provides React components and hooks for Uppy upload interfaces.

- Downloads / mo: 4.2M
- Stars: 31.1K
- Last release: 6.1.1
- License: MIT
- Capabilities: [From the @uppy/react docs](https://uppy.io/docs/react/)

**Strengths**

- **Supports custom upload interfaces.** Choose headless components or hooks when the Dashboard layout is too restrictive.
- **Adds resumable upload transport.** Use the Tus plugin with a compatible tus server.

**Watch out for**

- **Unmounting can stop uploads.** Keep Uppy alive when transfers must continue between page changes.
- **Headless components need context.** Wrap the components in UppyContextProvider.

```sh
npm install @uppy/react@6.1.1 @uppy/core@^6.3.1 @uppy/dashboard@^6.0.3 react@19.2.0 react-dom@19.2.0
```

**Quickstart**

```typescript
import React from "react";
import { createRoot } from "react-dom/client";
import Uppy from "@uppy/core";
import Dashboard from "@uppy/react/dashboard";
import "@uppy/core/css/style.min.css";
import "@uppy/dashboard/css/style.min.css";
const uppy = new Uppy();
const host = document.createElement("div"); document.body.append(host);
createRoot(host).render(<Dashboard uppy={uppy} hideUploadButton />);

```

From [uppy-transloadit.mdx](https://uppy.io/docs/react/) · [Find projects using @uppy/react →](https://dashboard.exa.ai/playground/search?q=React%20projects%20using%20%40uppy/react%20for%20file%20uploads%2C%20custom%20dropzones%2C%20progress%2C%20presigned%20uploads%2C%20typed%20file%20routes%20and%20transfer%20cancellation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

### Mantine Dropzone

[GitHub](https://github.com/mantinedev/mantine) · [npm](https://www.npmjs.com/package/@mantine/dropzone) · [Docs](https://mantine.dev/x/dropzone/)

Provides a dropzone component built with Mantine theme and components.

- Downloads / mo: 3.3M
- Stars: 32.0K
- Last release: 9.8.1
- License: MIT
- Capabilities: [From the Mantine Dropzone docs](https://mantine.dev/x/dropzone/)

```sh
npm install @mantine/dropzone@9.8.1 @mantine/core@9.8.1 @mantine/hooks@9.8.1 react@19.2.0 react-dom@19.2.0
```

**civitai/civitai** (7.3K stars)

[civitai/civitai](https://github.com/civitai/civitai) 

```typescript
export function ImageDropzone({
  disabled: initialDisabled,
  max = 10,
  hasError,
  onDrop,
  count,
  label,
  description,
  accept = IMAGE_MIME_TYPE,
  maxSize = constants.mediaUpload.maxImageFileSize,
  onExceedMax,
  allowExternalImageDrop,
  onDropCapture,
  children,
  iconSize = 50,
  ...props
}: Props) {
  const theme = useMantineTheme();
  const colorScheme = useComputedColorScheme('dark');
  const [error, setError] = useState('');

  const canAddFiles = max - count > 0;
  const disabled = !canAddFiles || initialDisabled;
  // Replaces image/* and video/* with .jpg, .png, .mp4, etc.
  // zips do not show up correctly without these extra 2 "zip" files, but we don't want to show them
  const fileExtensions = accept
    .filter((t) => t !== MIME_TYPES.xZipCompressed && t !== MIME_TYPES.xZipMultipart)
    .map((type) => type.replace(/.*\//, '.'));
  const allowsVideo = VIDEO_MIME_TYPE.some((a) => accept.includes(a));

  const handleDrop = (files: File[]) => {
    const hasLargeImageFiles = files.some(
      (file) => IMAGE_MIME_TYPE.includes(file.type as IMAGE_MIME_TYPE) && file.size > maxSize
    );
    if (hasLargeImageFiles) return setError(`Images should not exceed ${formatBytes(maxSize)}`);

    setError('');

    if (!!onExceedMax && files.length > max - count) {
      onExceedMax();
    }

    onDrop?.(files.slice(0, max - count));
  };

  const handleDropCapture = async (e: DragEvent) => {
    const url = e.dataTransfer.getData('text/uri-list');
    if (!url.length || (!allowExternalImageDrop && !isOrchestratorUrl(url))) return;
    onDropCapture ? onDropCapture(url) : handleDropCaptureUrl(url);
  };

  async function handleDropCaptureUrl(url: string) {
    const blob = await fetchBlob(url);
    if (!blob) return;
    const file = new File([blob], url.substring(url.lastIndexOf('/')), { type: blob.type });
    handleDrop([file]);
  }

  return (
    <>
      <Dropzone
        {...props}
        accept={accept}
        className={clsx('flex size-full items-center justify-center', classes.dropzone, {
          [classes.error]: hasError || !!error,
          'mb-1': hasError || !!error,
        })}
        disabled={!canAddFiles || disabled}
        onDrop={handleDrop}
        onDropCapture={handleDropCapture}
        useFsAccessApi={!isAndroidDevice()}
      >
        <div className="pointer-events-none flex min-h-28 flex-col items-center justify-center gap-2">
          <Dropzone.Accept>
            <IconUpload
              size={iconSize}
              stroke={1.5}
              color={theme.colors[theme.primaryColor][colorScheme === 'dark' ? 4 : 6]}
            />
          </Dropzone.Accept>
          <Dropzone.Reject>
            <IconX
              size={iconSize}
              stroke={1.5}
              color={theme.colors.red[colorScheme === 'dark' ? 4 : 6]}
            />
          </Dropzone.Reject>
          <Dropzone.Idle>
            <IconPhoto size={iconSize} stroke={1.5} />
          </Dropzone.Idle>

          {children ?? (
            <div className="flex flex-col items-center gap-1">
              <Text size="xl" inline align="center">
                {label ?? 'Drag images here or click to select files'}
              </Text>
              {description}
              {(!max || max > 1) && (
                <Text size="sm" c="dimmed" mt={7} inline>
                  {max ? `Attach up to ${max} files` : 'Attach as many files as you like'}
                </Text>
              )}
              {fileExtensions.length > 0 && (
                <Text size="sm" c="dimmed" inline>
                  {`Accepted file types: ${fileExtensions.join(', ')}`}
                </Text>
              )}
              <Text size="sm" c="dimmed" inline>
                {`Images cannot exceed ${formatBytes(maxSize)} `}
              </Text>
              {allowsVideo && (
                <Text size="sm" c="dimmed" inline>
                  {`Videos cannot exceed ${formatBytes(
                    constants.mediaUpload.maxVideoFileSize
                  )}, 4K resolution, or ${
                    constants.mediaUpload.maxVideoDurationSeconds
                  } seconds in duration`}
                </Text>
              )}
            </div>
          )}
        </div>
      </Dropzone>
      {error && <Input.Error className="mt-1">{error}</Input.Error>}
    </>
  );
}

```

[src/components/Image/ImageDropzone/ImageDropzone.tsx](https://github.com/civitai/civitai/blob/f0c32bad7370f2524d4a33176da49289ab221efc/src/components/Image/ImageDropzone/ImageDropzone.tsx) · [More projects using Mantine Dropzone →](https://dashboard.exa.ai/playground/search?q=%40mantine/dropzone%20GitHub%20projects)

**Quickstart**

```typescript
import React from "react";
import { createRoot } from "react-dom/client";
import { MantineProvider } from "@mantine/core";
import { Dropzone } from "@mantine/dropzone";
import "@mantine/core/styles.css";
import "@mantine/dropzone/styles.css";
const host = document.createElement("div"); document.body.append(host);
createRoot(host).render(<MantineProvider><Dropzone maxSize={5 * 1024 * 1024} onDrop={(files) => console.log(files)}>Drop or choose files</Dropzone></MantineProvider>);

```

From [README.md](https://mantine.dev/x/dropzone/)

### use-file-picker

[GitHub](https://github.com/Jaaneek/useFilePicker) · [npm](https://www.npmjs.com/package/use-file-picker) · [Docs](https://api.github.com/repos/Jaaneek/useFilePicker/readme)

Opens the browser file selector from a React hook.

- Downloads / mo: 1.1M
- Stars: 303
- Last release: 2.1.4
- License: MIT
- Capabilities: [From the use-file-picker docs](https://api.github.com/repos/Jaaneek/useFilePicker/readme)

```sh
npm install use-file-picker@2.1.4 react@19.2.0 react-dom@19.2.0
```

**udecode/plate-playground-template** (243 stars)

[udecode/plate-playground-template](https://github.com/udecode/plate-playground-template) 

```typescript
export function ImportToolbarButton(props: DropdownMenuProps) {
  const editor = useEditorRef();
  const [open, setOpen] = React.useState(false);

  const getFileNodes = (text: string, type: ImportType) => {
    if (type === 'html') {
      const editorNode = getEditorDOMFromHtmlString(text);
      const nodes = editor.api.html.deserialize({
        element: editorNode,
      });

      return nodes;
    }

    if (type === 'markdown') {
      return editor.getApi(MarkdownPlugin).markdown.deserialize(text);
    }

    return [];
  };

  const { openFilePicker: openMdFilePicker } = useFilePicker({
    accept: ['.md', '.mdx'],
    multiple: false,
    onFilesSelected: async ({ plainFiles }) => {
      const text = await plainFiles[0].text();

      const nodes = getFileNodes(text, 'markdown');

      editor.tf.insertNodes(nodes);
    },
  });

  const { openFilePicker: openHtmlFilePicker } = useFilePicker({
    accept: ['text/html'],
    multiple: false,
    onFilesSelected: async ({ plainFiles }) => {
      const text = await plainFiles[0].text();

      const nodes = getFileNodes(text, 'html');

      editor.tf.insertNodes(nodes);
    },
  });

  const { openFilePicker: openDocxFilePicker } = useFilePicker({
    accept: ['.docx'],
    multiple: false,
    onFilesSelected: async ({ plainFiles }) => {
      const arrayBuffer = await plainFiles[0].arrayBuffer();
      const result = await importDocx(editor, arrayBuffer);

      editor.tf.insertNodes(result.nodes as typeof editor.children);
    },
  });

  return (
    <DropdownMenu modal={false} onOpenChange={setOpen} open={open} {...props}>
      <DropdownMenuTrigger asChild>
        <ToolbarButton isDropdown pressed={open} tooltip="Import">
          <ArrowUpToLineIcon className="size-4" />
        </ToolbarButton>
      </DropdownMenuTrigger>

      <DropdownMenuContent align="start">
        <DropdownMenuGroup>
          <DropdownMenuItem
            onSelect={() => {
              openHtmlFilePicker();
            }}
          >
            Import from HTML
          </DropdownMenuItem>

          <DropdownMenuItem
            onSelect={() => {
              openMdFilePicker();
            }}
          >
            Import from Markdown
          </DropdownMenuItem>

          <DropdownMenuItem
            onSelect={() => {
              openDocxFilePicker();
            }}
          >
            Import from Word
          </DropdownMenuItem>
        </DropdownMenuGroup>
      </DropdownMenuContent>
    </DropdownMenu>
  );
}

```

[src/components/ui/import-toolbar-button.tsx](https://github.com/udecode/plate-playground-template/blob/8d7c29a1d13e77c43e0d75ebfcd217311dc1456c/src/components/ui/import-toolbar-button.tsx) · [More projects using use-file-picker →](https://dashboard.exa.ai/playground/search?q=use-file-picker%20GitHub%20projects)

**Quickstart**

```typescript
import React from "react";
import { createRoot } from "react-dom/client";
import { useFilePicker } from "use-file-picker";
function Picker() { const { openFilePicker } = useFilePicker({ accept: ".txt", multiple: false, onFilesSelected: ({ plainFiles }) => console.log(plainFiles) }); return <button onClick={() => openFilePicker()}>Choose a text file</button>; }
const host = document.createElement("div"); document.body.append(host);
createRoot(host).render(<Picker />);

```

From [README.md](https://api.github.com/repos/Jaaneek/useFilePicker/readme)

### React FilePond

[GitHub](https://github.com/pqina/react-filepond) · [npm](https://www.npmjs.com/package/react-filepond) · [Docs](https://api.github.com/repos/pqina/react-filepond/readme)

Adapts FilePond as a React component.

- Downloads / mo: 878.9K
- Stars: 2.0K
- Last release: 7.1.3
- License: MIT
- Capabilities: [From the React FilePond docs](https://api.github.com/repos/pqina/react-filepond/readme)

```sh
npm install react-filepond@7.1.3 filepond@4 react@19.2.0 react-dom@19.2.0
```

**semperai/amica** (1.6K stars)

[semperai/amica](https://github.com/semperai/amica) 

```typescript
export default function Share() {
  const { t } = useTranslation();
  const { viewer } = useContext(ViewerContext);

  const [description, setDescription] = useState('');
  const [name, setName] = useState('');
  const [systemPrompt, setSystemPrompt] = useState('');
  const [visionSystemPrompt, setVisionSystemPrompt] = useState('');
  const [bgUrl, setBgUrl] = useState('');
  const [youtubeVideoId, setYoutubeVideoId] = useState('');
  const [vrmUrl, setVrmUrl] = useState('');
  const [vrmHash, setVrmHash] = useState('');
  const [vrmSaveType, setVrmSaveType] = useState('');
  const [animationUrl, setAnimationUrl] = useState('');
  const [voiceUrl, setVoiceUrl] = useState('');

  const [bgFiles, setBgFiles] = useState([]);
  const [vrmFiles, setVrmFiles] = useState([]);
  const [animationFiles, setAnimationFiles] = useState([]);
  const [voiceFiles, setVoiceFiles] = useState([]);

  const [vrmLoaded, setVrmLoaded] = useState(false);
  const [vrmLoadedFromIndexedDb, setVrmLoadedFromIndexedDb] = useState(false);
  const [vrmLoadingFromIndexedDb, setVrmLoadingFromIndexedDb] = useState(false);
  const [showUploadLocalVrmMessage, setShowUploadLocalVrmMessage] = useState(false);


  const [sqid, setSqid] = useState('');

  const vrmUploadFilePond = useRef<FilePond | null>(null);

  const delay = (ms: number) => new Promise(res => setTimeout(res, ms));

  async function uploadVrmFromIndexedDb() {
    const blob = await vrmDataProvider.getItemAsBlob(vrmHash);
    if (vrmUploadFilePond.current && blob) {
      vrmUploadFilePond.current.addFile(blob).then(() => { setVrmLoadingFromIndexedDb(true); });
    } else {
      console.log("FilePond not loaded, retry in 0.5 sec");
      delay(500).then(uploadVrmFromIndexedDb);
    }
  }

  useEffect(() => {
    setName(config('name'));
    setSystemPrompt(config('system_prompt'));
    setVisionSystemPrompt(config('vision_system_prompt'));
    if (!config('bg_url').startsWith('data')) {
      setBgUrl(config('bg_url'));
    }
    setYoutubeVideoId(config('youtube_videoid'));
    setVrmUrl(config('vrm_url'));
    setVrmHash(config('vrm_hash'));
    setVrmSaveType(config('vrm_save_type'));
    setAnimationUrl(config('animation_url'));
    setVoiceUrl(config('voice_url'));
  }, []);

  useEffect(() => {
    if (vrmLoadedFromIndexedDb) {
      vrmDataProvider.addItemUrl(vrmHash, vrmUrl);
      updateConfig('vrm_url', vrmUrl);
      updateConfig('vrm_save_type', 'web');
      setVrmSaveType('web');
    }
  }, [vrmLoadedFromIndexedDb]);

  useEffect(() => {
    setShowUploadLocalVrmMessage(vrmSaveType == 'local' && !vrmLoadedFromIndexedDb && !vrmLoadingFromIndexedDb);
  }, [vrmSaveType, vrmLoadedFromIndexedDb, vrmLoadingFromIndexedDb]);

  const [isRegistering, setIsRegistering] = useState(false);
  function registerCharacter() {
    setIsRegistering(true);

    async function register() {
      const res = await fetch(`${process.env.NEXT_PUBLIC_AMICA_API_URL}/api/add_character`, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
        },
        body: JSON.stringify({
          description,
          name,
          system_prompt: systemPrompt,
          vision_system_prompt: visionSystemPrompt,
          bg_url: bgUrl,
          youtube_videoid: youtubeVideoId,
          vrm_url: vrmUrl,
          animation_url: animationUrl,
          voice_url: voiceUrl,
        }),
      });

      const data = await res.json();
      console.log('response', data);

      setSqid(data.sqid);

      setIsRegistering(false);
    }

    register();
  }

  const router = useRouter();

  const handleCloseIcon = () => {
    router.push('/');
  };

  useEffect(() => {
    document.body.style.backgroundImage = `url(/liquid-metaballs.jpg)`;
    document.body.style.backgroundSize = `cover`;
    document.body.style.backgroundRepeat = `no-repeat`;
    document.body.style.backgroundPosition = `bottom right`;
  }, []);

  return (
    
    <div className="p-10 md:p-20">
      <style jsx global>
        {`
        body {
          background-image: url('/liquid-metaballs.jpg');
          background-size: cover;
          background-repeat: no-repeat;
          background-position: bottom right;
        }
      `}
      </style>
      <div className="fixed top-0 left-0 w-full max-h-full text-black text-xs text-left z-20">
        <div className="p-2 bg-white">
            <IconButton
              iconName="24/Close"
              isProcessing={false}
              className="bg-secondary hover:bg-secondary-hover active:bg-secondary-active"
              onClick={handleCloseIcon}/>
        </div>
      </div>
      <div className="col-span-3 max-w-md rounded-xl mt-4">
        <h1 className="text-lg">{t("Character Creator")}</h1>
      </div>

      <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
        <div>
          <div className="sm:col-span-3 max-w-md rounded-xl mt-4">
            <label className="block text-sm font-medium leading-6 text-gray-900">
              {t("Description")}
            </label>
            <div className="mt-2">
              <textarea
                rows={4}
                className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
                value={description}
                readOnly={!!sqid}
                placeholder={t("Provide a description of the character")}
                onChange={(e) => {
                  setDescription(e.target.value);
                }}
              />
            </div>
          </div>

          <div className="sm:col-span-3 max-w-md rounded-xl mt-4">
            <label className="block text-sm font-medium leading-6 text-gray-900">
              {t("Name")}
            </label>
            <div className="mt-2">
              <input
                type="text"
                className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
                value={name}
                readOnly={!!sqid}
                onChange={(e) => {
                  setName(e.target.value);
                }}
              />
            </div>
          </div>

          <div className="sm:col-span-3 max-w-md rounded-xl mt-4">
            <label className="block text-sm font-medium leading-6 text-gray-900">
              {t("System Prompt")}
            </label>
            <div className="mt-2">
              <textarea
                rows={4}
                className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
                value={systemPrompt}
                readOnly={!!sqid}
                onChange={(e) => {
                  setSystemPrompt(e.target.value);
                }}
              />
            </div>
          </div>

          <div className="sm:col-span-3 max-w-md rounded-xl mt-4">
            <label className="block text-sm font-medium leading-6 text-gray-900">
              {t("Vision System Prompt")}
            </label>
            <div className="mt-2">
              <textarea
                rows={4}
                className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
                value={visionSystemPrompt}
                readOnly={!!sqid}
                onChange={(e) => {
                  setVisionSystemPrompt(e.target.value);
                }}
              />
            </div>
          </div>

          <div className="sm:col-span-3 max-w-md rounded-xl mt-4">
            <label className="block text-sm font-medium leading-6 text-gray-900">
              {t("Background URL")}
            </label>
            <div className="mt-2">
              <input
                type="text"
                className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
                value={bgUrl}
                readOnly={!!sqid}
                onChange={(e) => {
                  setBgUrl(e.target.value);
                }}
              />
              <FilePond
                files={bgFiles}
                // this is done to remove type error
                // filepond is not typed properly
                onupdatefiles={(files: any) => {
                  setBgFiles(files);
                }}
                server={`${process.env.NEXT_PUBLIC_AMICA_API_URL}/api/upload?type=bgimg`}
                name="file"
                labelIdle='.png & .jpg files only<br />click or drag & drop'
                acceptedFileTypes={['image/png', 'image/jpeg']}
                onremovefile={(err, file) => {
                  if (err) {
                    console.error(err);
                    return;
                  }

                  setBgUrl('');
                }}
                onprocessfile={(err, file) => {
                  if (err) {
                    console.error(err);
                    return;
                  }

                  async function handleFile(file: File) {
                    const hashValue = await hashFile(file);
                    setBgUrl(`${process.env.NEXT_PUBLIC_AMICA_STORAGE_URL}/${hashValue}`);
                  }

                  handleFile(file.file as File);
                }}
                disabled={!!sqid}
              />
            </div>
          </div>

          <div className="sm:col-span-3 max-w-md rounded-xl mt-4">
            <label className="block text-sm font-medium leading-6 text-gray-900">
              {t("YouTube Video ID")}
            </label>
            <div className="mt-2">
              <p className="text-xs text-slate-500">{t("Example")}: https://www.youtube.com/watch?v=<span className="text-red-500">dQw4w9WgXcQ</span></p>
              <input
                type="text"
                className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
                value={youtubeVideoId}
                readOnly={!!sqid}
                onChange={(e) => {
                  setYoutubeVideoId(e.target.value);
                }}
              />
              {youtubeVideoId && (
                <img width="100%" src={`https://img.youtube.com/vi/${youtubeVideoId}/0.jpg`} />
              )}
            </div>
          </div>

          {showUploadLocalVrmMessage && (
            <div className="sm:col-span-3 max-w-md rounded-xl mt-4">
              <label className="block text-sm font-medium leading-6 text-gray-900">
                {t("Upload VRM")}
              </label>
              <div className="mt-2 text-sm leading-6 text-gray-900">
                <p>{t("VRM upload message")}</p>
                <p>{t("VRM local share message")}</p>
                <div className="sm:col-span-3 max-w-md rounded-xl mt-2">
                  <button
                    onClick={uploadVrmFromIndexedDb}
                    className="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-fuchsia-500 hover:bg-fuchsia-600 focus:outline-none disabled:opacity-50 disabled:hover:bg-fuchsia-500 disabled:cursor-not-allowed"
                  >
                    {t("Upload Vrm")}
                  </button>
                </div>
              </div>
            </div>
          )}

          <div className={"sm:col-span-3 max-w-md rounded-xl mt-4" + (!showUploadLocalVrmMessage ? "" : " hidden")}>
            <label className="block text-sm font-medium leading-6 text-gray-900">
              {t("VRM Url")}
            </label>
            <div className="mt-2">
              <p className="text-xs text-slate-500"></p>
              <input
                type="text"
                className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
                value={vrmUrl}
                readOnly={!!sqid}
                onChange={(e) => {
                  setVrmUrl(e.target.value);
                  updateVrmAvatar(viewer, e.target.value);
                  setVrmLoaded(false);
                }}
              />
              <FilePond
                ref={vrmUploadFilePond}
                files={vrmFiles}
                // this is done to remove type error
                // filepond is not typed properly
                onupdatefiles={(files: any) => {
                  setVrmFiles(files);
                }}
                server={`${process.env.NEXT_PUBLIC_AMICA_API_URL}/api/upload?type=vrm`}
                name="file"
                labelIdle='.vrm files only<br />click or drag & drop'
                acceptedFileTypes={['model/gltf-binary']}
                fileValidateTypeDetectType={vrmDetector}
                onaddfilestart={(file) => {
                  setVrmUrl('');
                  setVrmLoaded(false);
                }}
                onremovefile={(err, file) => {
                  if (err) {
                    console.error(err);
                    return;
                  }

                  setVrmUrl('');
                  setVrmLoaded(false);
                }}
                onprocessfile={(err, file) => {
                  if (err) {
                    console.error(err);
                    return;
                  }

                  async function handleFile(file: File) {
                    const hashValue = await hashFile(file);
                    const url = `${process.env.NEXT_PUBLIC_AMICA_STORAGE_URL}/${hashValue}`;
                    setVrmUrl(url);
                    updateVrmAvatar(viewer, url);
                    if (vrmSaveType == 'local') {
                      setVrmLoadingFromIndexedDb(false);
                      setVrmLoadedFromIndexedDb(true);
                    }
                    setVrmLoaded(false);
                  }

                  handleFile(file.file as File);
                }}
                disabled={!!sqid}
              />

              <div className="sm:col-span-3 max-w-md rounded-xl mt-4 bg-gray-100">
                {vrmUrl && (
                  <VrmDemo
                    vrmUrl={vrmUrl}
                    onLoaded={() => {
                      setVrmLoaded(true);
                      (async () => {
                        try {
                          const animation = await loadVRMAnimation("/animations/idle_loop.vrma");
                          if (!animation) {
                            console.error('loading animation failed');
                            return;
                          }
                          viewer.model!.loadAnimation(animation!);
                          requestAnimationFrame(() => {
                            viewer.resetCamera()
                          });
                        } catch (e) {
                          console.error('loading animation failed', e);
                        }
                      })();
                      console.log('vrm demo loaded');
                    }}
                  />
                )}
              </div>
            </div>
          </div>

          {/*
          <div className="sm:col-span-3 max-w-md rounded-xl mt-4">
            <label className="block text-sm font-medium leading-6 text-gray-900">
              Animation Url
            </label>
            <div className="mt-2">
              <input
                type="text"
                className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
                value={animationUrl}
                readOnly={!! sqid}
                onChange={(e) => {
                  setAnimationUrl(e.target.value);
                }}
              />
              <FilePond
                files={animationFiles}
                // this is done to remove type error
                // filepond is not typed properly
                onupdatefiles={(files: any) => {
                  setAnimationFiles(files);
                }}
                // TODO read this url from env
                server={`${process.env.NEXT_PUBLIC_AMICA_API_URL}/api/upload?type=anim`}
                name="file"
                labelIdle='.vrm files only<br />click or drag & drop'
                acceptedFileTypes={['model/gltf-binary']}
                fileValidateTypeDetectType={vrmDetector}
                onremovefile={(err, file) => {
                  if (err) {
                    console.error(err);
                    return;
                  }

                  setAnimationUrl('');
                }}
                onprocessfile={(err, file) => {
                  if (err) {
                    console.error(err);
                    return;
                  }

                  async function handleFile(file: File) {
                    const hashValue = await hashFile(file);
                    setAnimationUrl(`${process.env.NEXT_PUBLIC_AMICA_STORAGE_URL}/${hashValue}`);
                  }

                  handleFile(file.file as File);
                }}
                disabled={!! sqid}
              />
            </div>
          </div>
          */}

          <div className="sm:col-span-3 max-w-md rounded-xl mt-4">
            <label className="block text-sm font-medium leading-6 text-gray-900">
              Voice Url
            </label>
            <div className="mt-2">
              <input
                type="text"
                className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6"
                value={voiceUrl}
                readOnly={!!sqid}
                onChange={(e) => {
                  setVoiceUrl(e.target.value);
                }}
              />
              <FilePond
                files={voiceFiles}
                // this is done to remove type error
                // filepond is not typed properly
                onupdatefiles={(files: any) => {
                  setVoiceFiles(files);
                }}
                server={`${process.env.NEXT_PUBLIC_AMICA_API_URL}/api/upload?type=voice`}
                name="file"
                labelIdle='.wav & .mp3 files only<br />click or drag & drop'
                acceptedFileTypes={['audio/wav', 'audio/mpeg']}
                onremovefile={(err, file) => {
                  if (err) {
                    console.error(err);
                    return;
                  }

                  setVoiceUrl('');
                }}
                onprocessfile={(err, file) => {
                  if (err) {
                    console.error(err);
                    return;
                  }

                  async function handleFile(file: File) {
                    const hashValue = await hashFile(file);
                    setVoiceUrl(`${process.env.NEXT_PUBLIC_AMICA_STORAGE_URL}/${hashValue}`);
                  }

                  handleFile(file.file as File);
                }}
                disabled={!!sqid}
              />
            </div>
          </div>

          {!sqid && (
            <div className="sm:col-span-3 max-w-md rounded-xl mt-8">
              <button
                onClick={registerCharacter}
                className="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-fuchsia-500 hover:bg-fuchsia-600 focus:outline-none disabled:opacity-50 disabled:hover:bg-fuchsia-500 disabled:cursor-not-allowed"
                disabled={!vrmLoaded || showUploadLocalVrmMessage || vrmLoadingFromIndexedDb || isRegistering}
              >
                {t("Save Character")}
              </button>
            </div>
          )}

          {sqid && (
            <div className="sm:col-span-3 max-w-md rounded-xl mt-8">
              <p className="text-sm">{t("Share this code (click to copy):")}</p>
              <input
                type="text"
                className="inline-flex items-center px-2 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-fuchsia-600 bg-fuchsia-100 hover:bg-fuchsia-200 focus:outline-transparent focus:border-transparent border-transparent disabled:opacity-50 disabled:hover:bg-fuchsia-50 disabled:cursor-not-allowed hover:cursor-copy"
                defaultValue={sqid}
                readOnly
                onClick={(e) => {
                  // @ts-ignore
                  navigator.clipboard.writeText(e.target.value);
                }}
              />
              <p className="mt-6 text-sm">
                {t("Or, you can share this direct link:")}
                {' '}
                <Link
                  href={`https://amica.arbius.ai/import/${sqid}`}
                  target={isTauri() ? "_blank" : ''}
                  className="text-cyan-600 hover:text-cyan-700"
                >
                  https://amica.arbius.ai/import/{sqid}
                </Link>
              </p>

              <Link href="/">
                <button
                  className="mt-6 inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-emerald-500 hover:bg-emerald-600 focus:outline-none disabled:opacity-50 disabled:hover:bg-emerald-500 disabled:cursor-not-allowed"
                >
                  {t("Return Home")}
                </button>
              </Link>
            </div>
          )}
        </div>
        <div>
          {/* empty column */}
        </div>
      </div>
    </div>
  );
}

```

[src/pages/share.tsx](https://github.com/semperai/amica/blob/b337a9a44f969f6e87636c1b6fd706298df912cb/src/pages/share.tsx) · [More projects using React FilePond →](https://dashboard.exa.ai/playground/search?q=react-filepond%20GitHub%20projects)

**Quickstart**

```typescript
import React from "react";
import { createRoot } from "react-dom/client";
import { FilePond } from "react-filepond";
import "filepond/dist/filepond.min.css";
const host = document.createElement("div"); document.body.append(host);
createRoot(host).render(<FilePond server="/upload" />);

```

From [README.md](https://api.github.com/repos/pqina/react-filepond/readme)

### @uploadthing/react

[GitHub](https://github.com/pingdotgg/uploadthing) · [npm](https://www.npmjs.com/package/@uploadthing/react) · [Docs](https://docs.uploadthing.com/getting-started/appdir)

Provides React upload components and typed upload hooks for UploadThing.

- Downloads / mo: 688.4K
- Stars: 5.4K
- Last release: 7.3.3
- License: MIT
- Capabilities: [From the @uploadthing/react docs](https://docs.uploadthing.com/getting-started/appdir)

**Strengths**

- **Connects uploads to typed routes.** Generate components and helpers from the server file-router type.
- **Reports upload progress.** Use onUploadProgress to update the application during transfers.

**Watch out for**

- **Needs server file routes.** Configure route permissions and completion handling on the server.

```sh
npm install @uploadthing/react@7.3.3 uploadthing@^7.2.0 next@16 react@19.2.0 react-dom@19.2.0
```

**sadmann7/file-uploader** (1.4K stars)

[sadmann7/file-uploader](https://github.com/sadmann7/file-uploader) 

```typescript
async function onUpload(files: File[]) {
    setIsUploading(true);
    try {
      const res = await uploadFiles(endpoint, {
        ...props,
        files,
        onUploadProgress: ({ file, progress }) => {
          setProgresses((prev) => {
            return {
              ...prev,
              [file.name]: progress,
            };
          });
        },
      });

      setUploadedFiles((prev) => (prev ? [...prev, ...res] : res));
    } catch (error) {
      if (error instanceof UploadThingError) {
        const errorMessage =
          error.data && "error" in error.data
            ? error.data.error
            : "Upload failed";
        toast.error(errorMessage);
        return;
      }

      toast.error(
        error instanceof Error ? error.message : "An unknown error occurred",
      );
    } finally {
      setProgresses({});
      setIsUploading(false);
    }
  }

```

[src/hooks/use-upload-file.ts](https://github.com/sadmann7/file-uploader/blob/665aded7abf9416cb548757a4b27e8cda200106b/src/hooks/use-upload-file.ts) · [More projects using @uploadthing/react →](https://dashboard.exa.ai/playground/search?q=React%20projects%20using%20%40uploadthing/react%20for%20file%20uploads%2C%20custom%20dropzones%2C%20progress%2C%20presigned%20uploads%2C%20typed%20file%20routes%20and%20transfer%20cancellation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```typescript
"use client";
import { generateReactHelpers } from "@uploadthing/react";
const { useUploadThing } = generateReactHelpers();
export default function App() {
  const { startUpload, isUploading } = useUploadThing("imageUploader");
  return <input type="file" accept="image/*" disabled={isUploading} onChange={(event) => { const files = Array.from(event.target.files ?? []); if (files.length) startUpload(files).catch(console.error); }} />;
}

```

From [page.tsx](https://docs.uploadthing.com/getting-started/appdir)

### react-drag-drop-files

[GitHub](https://github.com/KarimMokhtar/react-drag-drop-files) · [npm](https://www.npmjs.com/package/react-drag-drop-files) · [Docs](https://api.github.com/repos/KarimMokhtar/react-drag-drop-files/readme)

Provides drag-and-drop uploads for files and images in React, styled with styled-components.

- Downloads / mo: 557.8K
- Stars: 270
- Last release: 3.1.0
- License: MIT
- Capabilities: [From the react-drag-drop-files docs](https://api.github.com/repos/KarimMokhtar/react-drag-drop-files/readme)

```sh
npm install react-drag-drop-files@3.1.0 react@19.2.0 react-dom@19.2.0
```

**Quickstart**

```typescript
import React from "react";
import { createRoot } from "react-dom/client";
import { FileUploader } from "react-drag-drop-files";
const host = document.createElement("div"); document.body.append(host);
createRoot(host).render(<FileUploader name="image" types={["JPG", "PNG"]} handleChange={(files) => console.log(files)} />);

```

From [README.md](https://api.github.com/repos/KarimMokhtar/react-drag-drop-files/readme) · [Find projects using react-drag-drop-files →](https://dashboard.exa.ai/playground/search?q=react-drag-drop-files%20GitHub%20projects)

## FAQ

### Which React file upload library should I use?

[react-dropzone](#react-dropzone) suits drag-and-drop file selection with a separate upload transport. [@uppy/react](#uppy-react) suits full upload interfaces with resumable transfers through a tus server. [@uploadthing/react](#uploadthing-react) suits uploads to UploadThing through typed server routes.

### What is UploadThing?

[@uploadthing/react](#uploadthing-react) provides React upload components and typed upload hooks for UploadThing. Its file routes are configured on the server.

### Does react-dropzone upload files?

No. [react-dropzone](#react-dropzone) handles file selection. The application supplies its own upload transport.

### What is Uppy for React?

[@uppy/react](#uppy-react) provides React components and hooks for Uppy upload interfaces. Its Tus plugin adds resumable uploads.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best React file upload libraries react-dropzone Uppy React UploadThing React Dropzone Uploader examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
