Empty States

Seven drawn empty states: no projects, no results, inbox zero, no data, no agents, locked, 404.

Category
Data & feedback
Access
Free with an account
Source
383 lines · one file
States
8 drawn

The decision inside it

A quiet drawing and a loud button

The scene is decoration, hidden from screen readers; the words carry the meaning. Only one detail in each drawing is in the foreground colour, so the eye goes from the picture to the action, not around the picture.

When to use it

Use Empty States for a page or panel with nothing in it yet, a search with no results, an inbox at zero, a chart with no data, no agents yet, a page you can't see, or a 404: a drawn scene, a title, a line and one action. Use Empty & Loading States (State) for errors, loading and plain icon-only empties.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Liro's Empty States for this.
Install it: npx shadcn@latest add @liro/empty-states
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/empty-states.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Free components install through the @liro registry with your CLI token: see the Namespaced tab.

Usage

components/projects-empty.tsx
import { FolderPlus } from "lucide-react";
import { EmptyState } from "@/components/ui/empty-states";

export function ProjectsEmpty({ onCreate }: { onCreate: () => void }) {
  return (
    <EmptyState
      illustration="projects"
      title="No projects yet"
      description="A project keeps a deal's documents, signers and reminders together."
      primaryAction={{ label: "New project", icon: <FolderPlus />, onClick: onCreate }}
      secondaryAction={{ label: "Import from Drive", href: "/import" }}
    />
  );
}

API reference

“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

TypeNotes
illustrationEmptyIllustrationName | React.ReactNode YesOne of the seven drawn scenes, or your own node.
titleReact.ReactNode Yes–
descriptionReact.ReactNode No–
primaryActionEmptyStateAction NoThe one action that fills the space. Drawn as the primary button.
secondaryActionEmptyStateAction NoA quieter way forward: docs, an import, a link home.
size"sm" | "md" No"md" (default) for a page; "sm" for a panel or a card.
framedboolean NoDraw a dashed frame: for an empty region inside a page.
animateboolean NoPlay the scene's loop. Default true; always still under reduced motion.
headingLevel2 | 3 | 4 NoHeading level for the title. Default 2.

Dependencies

npm packages

clsxframer-motiontailwind-merge

Liro foundations, installed alongside it

liro-themebutton

States

All of them are drawn by the component. None is left for you to design.

  • No projects
  • No results
  • Inbox zero
  • No data
  • No agents
  • Locked
  • 404
  • In a panel

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances

Used in a screenAll screens