Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Empty State File Upload Block for React

An illustrated empty state whose drawn folder is the drop zone: a pick closes the folder and lists the file, with working Add files, Paste a link and New folder shortcuts.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Turn the first empty screen into the first upload, with this file upload panel for React with Base UI. It is the empty state of Tidyfile, a document organiser for freelancers. The catalog Empty holds a drawn open folder that is itself the File Upload drop zone. A pick or a drop closes the folder, with the sheets sinking and the front panel rising in CSS, and the file's name drops into a list under it with a count. Three shortcuts really work: Add files, the one Shine Button, opens the picker; Paste a link opens an inline Input that parses the URL and lists its host and path; New folder opens one that checks the name for slashes and for a twin. The inline field has a reserved slot, so opening it moves nothing. The panel is ruled by Guides. It is built from Empty, File Upload, Input, Button, Shine Button and Guides, with a CSS entrance only. For file managers, document apps and any list that starts empty.

FAQ

How does the folder close?

It is an inline SVG with three parts: a back panel, two sheets and a front panel. When the list has an item the sheets fade and sink and the front panel scales up from its foot, all with a CSS transition that reduced motion switches off. The drawing is hidden from screen readers; the drop zone around it is named "Drop files on the folder, or press to choose".

What does New folder check?

That the name is one to forty characters, has no slash and is not already a folder here, ignoring case. The folder is added to the list as an empty folder in local state.

Does it read the files I add?

No. A file joins the list with its name and its size, and the block says in a polite status line that nothing is uploaded. Files over 100 MB are refused with a message.

Where does focus go?

Opening a shortcut focuses its field; adding or cancelling returns focus to the button that opened it. Removing a row focuses the next row's Remove button, or Add files when the list is empty. Remove buttons are 44 px on a phone.

How do I connect it to my app?

Replace the local list with your documents. Send picked files from the accepted handler to your storage, resolve links on your server (never in the browser), and create folders through your API; show the empty state again when the list is empty.

  • Pro

    A drawn project brief that is itself the drop zone: nothing shows until a file is dragged over it, then a full-bleed message appears, and dropped files join an attachments list with a short bar.

  • Pro

    A project folder's drop zone that folds into a slim Add more strip over its file list as files arrive, with a running total against 25 MB, Remove on each row and Clear all.

  • Pro

    No Files Empty State

    Files and docs

    A file manager's empty All files page in a framed window: the catalog sidebar with its counts, a large dashed drop zone with a drawn filing drawer, and a table that lists the files you choose or drop.

  • Pro

    A transfer tool's uploads page as a whole screen: one big dashed drop zone with a drawn letterbox, the rules shown and enforced, and two lists, the files added and the files turned down with their reasons.

  • Pro

    A deep inset drop zone whose 1 px edge lights up where the pointer is and glows evenly on focus, over a tray of attachment rows with Remove and Clear tray.

  • Pro

    A phone-first uploader drawn in a 360 px device frame: a large Choose files target, a Take photo camera shortcut, compact file chips and a bottom drawer quick look with Remove.