Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Empty State examples · Data

No Files Empty State for React

An empty folder with a file icon and Upload Files and Create Document buttons.

Framework
UI library

An empty folder that offers both ways to fill it. A file icon in the icon tile, the title No files uploaded, and a description sit above two buttons: Upload Files and an outline Create Document, each with an icon before its label. Use it in file managers, document libraries and shared drives.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

What are the two actions?

Upload Files is a default Button with an UploadIcon icon. Create Document is variant="outline" with a PlusIcon icon. Both sit in a div with flex gap-2 inside EmptyContent.

What icon is in the header?

FileTextIcon is inside EmptyMedia with variant="icon". The icons on the buttons are separate from that tile.

What does the empty folder say?

EmptyTitle is "No files uploaded". EmptyDescription says the folder is empty and to upload files or create documents to get started.

Which button comes first?

Upload Files is first in the row, then Create Document. The row uses gap-2, so the gap follows the inline direction.

Do the buttons open a file picker?

No. This demo only renders the buttons. Add a click handler on Upload Files for the picker and on Create Document for the create flow.

How should the icons be treated?

The title already says no files are uploaded, and the button names are their labels. Mark FileTextIcon, UploadIcon, and PlusIcon aria-hidden.