Skip to content

FileDropZone

Stable

Where people drop or browse for files, with the kinds and sizes that work said up front.

Also known as file upload, dropzone, drag and drop upload, uploader

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Add files

Add files

PDF, DOCX, CSV, PNG. Up to 25 MB.

Press Browse files, or drag files onto the area. A file of the wrong kind or size says why.

When to use it

Makes adding files easy and predictable, so people know what will work before they try.

Made of: Icon · Title · Kinds and size · Browse files · Errors

Use it for

  • Adding files to a chat, a project or a research run.
  • Uploads with limits on kind or size.

Not for

Do and avoid

Add files

PDF, DOCX, PNG. Up to 30 MB.

Do. Says which files work up front, and Browse files works without dragging.
Drag files here
Avoid. Drag only shuts out keyboard and touch users, and limits come as surprises.

Do

  • Say the kinds and size limit before anyone tries.
  • Name the file that did not work and say why.
  • Keep Browse files for people who cannot drag.

Avoid

  • Do not make dragging the only way.
  • Do not reject a file without saying which one.

On a phone

  • On a phone, Browse files opens the phone's own picker; dragging is rare there.
  • The area fills the width and its button is a full tap target.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started