Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

No Folders Empty State Block for React

A file organiser's empty folder view: a breadcrumb with an Up button, a shelf of four slots that fill with folders you name, each one opening onto its own empty folder, and a drawn stack of three folders with the top one dashed.

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

Show an empty folder as the first of many, with this no folders empty state for React with Base UI. A hairline frame with a plus mark on each corner holds the folder view of Binderfly, a file organiser, in three bands. The first is a breadcrumb that starts at All files and grows with every folder you open, with an Up button at its end. The second is a shelf of four slots, dashed until a folder takes one. The third is the empty message: a drawn stack of three isometric folders with the top one dashed, a heading, a status line and the Shine Button, the only colored control. New folder opens a name field in the next slot: Enter or the button keeps it as a folder tile, Escape drops it. Pressing a tile opens that folder onto its own empty shelf, with its own New folder, and the stack's top folder turns solid as soon as the view holds one. The frame is ruled by Guides, the field is an Input in a Field, and the transitions are CSS only. For the empty tree of any app where people organise files.

FAQ

What stays in the page, and how do I make it real?

The folders live in the page's state: reload and the tree is empty, and Start over empties it without a reload. Nothing is saved or sent. To wire it for real, create the folder with your API where the code says so, add its tile from the response, and load a folder's children when it is opened instead of reading them from the list.

Why three levels and four folders to a level?

They are the demo's own limits, so the shelf can keep its size and the breadcrumb its single line. At the third level, and in a folder that holds four, New folder stays in the tab order and says why instead of doing nothing. The limits are the two constants at the top of the file; with your own data let the shelf grow and scroll.

How does naming a folder work?

The name field takes up to 20 characters. Enter keeps the folder, an empty name or a name that is already used in the folder is refused with a line that says so, and Escape drops the field and puts focus back on New folder. Pressing New folder again while the field is open keeps the name too, which is the same as Enter.

Is it usable with a keyboard and a screen reader?

The breadcrumb is a navigation landmark whose last step is the current page, Up and the breadcrumb steps go back, and every tile is a button named for its folder and what it holds, such as Open Design, 2 folders inside. Opening a folder moves focus to the message heading, which names the new place, and going back puts focus on the tile you came from. One polite status line says what changed.

How does it look on a phone?

The slots are two across in two rows, the breadcrumb truncates its names instead of wrapping and the message band stacks the drawing above the text, with New folder under it. The page never scrolls sideways, even at 320 px wide.

Does anything change the panel's height?

No. The shelf always has four slots of one height, whether they are dashed, filled or holding the name field, and the status line reserves its lines, so opening a folder or adding one never moves the bands below.

  • 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

    No Media Empty State

    Files and docs

    A media library's empty shelf: six tiles on shared hairlines, each with its own tiny drawn scene, that fill one by one with your own pictures, their file names and a Remove that puts the scene back.

  • 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

    No Projects Empty State

    Projects and tasks

    A projects table with nothing in it yet: a dashed, editable first row where you type a name and press Enter, three drawn ghost rows fading into the card, and a message band with one Create project button.

  • Pro

    A task's empty attachments popover shown open in place: a drawn paperclip holding a dashed sheet, Attachment rows that are dashed while there is room and done per file, and one Attach files button.

  • Pro

    A docs editor's empty library as a whole page: three document types as choice cards with drawn mini pages, one button that names the choice, and a quiet strip to drop a file instead.