Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

No Media Empty State Block for React

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.

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 media library as the shelf it is about to become, with this no media empty state for React with Base UI. A hairline frame with a plus mark on each corner holds Pebbleframe's library: six tiles on shared hairlines, three across (two on a phone), each with a tiny drawn scene of its own, a hill and the sun, a mug, a leaf, a bicycle, a boat and a lamp, inside a dashed frame that says a picture goes here. The Shine Button, the only colored control, opens the picker for images, and the shelf takes dropped pictures too. Each picture replaces the next free tile with its own thumbnail and its file name, the band's count reads 2 of 6 tiles filled, and Remove on a tile puts its scene back. Files that are not images are turned down in a line of words. The File Upload does the picking and dropping, the frame is ruled by Guides, and the tiles change with CSS only. For the empty library of any product that shows pictures.

FAQ

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

The pictures stay in the tab. A thumbnail is shown from a temporary address that the page makes for the file and revokes when its tile lets go of it; the file is never read, uploaded or saved, so a reload empties the shelf and Start over empties it without a reload. To wire it for real, send each file to your storage where the code says so, keep its URL in the tile instead of the temporary one, and show an upload failure in the status line.

How do the tiles fill?

Pictures take the free tiles in order, whether you chose them or dropped them on the shelf, and a tile you removed is the first to be free again. If more pictures come than there are free tiles, the ones that fit are added and the line says how many did not. With all six filled the button is off and the line says to remove one to make room; Remove, on any tile, turns it back on.

What happens with a file that is not a picture?

The picker only offers images, and a file that is not one, dropped on the shelf, is turned down: no tile takes it and the status line names the file. More than six at once is turned down too, with a line that says so. Change the accepted types on the File Upload, and the size limit if you want one.

Is it usable with a keyboard and a screen reader?

Tab reaches the button, Start over and each tile's Remove button, which is named for its file. The scenes are hidden from assistive technology and the thumbnails carry no description, since the file name beside each one says what it is. One polite status line says what changed, and after a removal focus moves to the button.

How does it look on a phone?

The tiles are two across, three rows, and the action band is pinned to the foot of the screen so the button is always in reach; from the medium breakpoint it is an ordinary band under the shelf. The page never scrolls sideways, even at 320 px wide.

Does anything change the panel's height?

No. A tile is the same size with a scene or a picture, its caption row is a fixed height with a file name or a tile number in it, and the status line reserves two lines, so the panel keeps its height from the first picture to the sixth.

  • 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 file drop zone that lists every file you pick or drop (name and size, never opened) beside a queue of four seeded files in their states, with Retry, Remove and a Send button.

  • Pro

    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.

  • 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.