No projects yet

Create your first project and it will show up here.

Code

<!-- pearl-empty.free.js: download it from the Install section below and host it with your site -->
<script src="/pearl-empty.free.js" defer></script>

<pearl-empty
  kind="empty"
  heading="No projects yet"
  text="Create your first project and it will show up here."
  action="New project"
  size="132"
  theme="light"
></pearl-empty>

<script>
  document.querySelector('pearl-empty').addEventListener('action', () => {
    console.log('pressed');
  });
</script>

In context

No search results

All caught up

Nothing needs your attention right now.
Mint, all caught up Pro

Install · Free Web Component

One file, no dependencies. Aurora preset, every other option included. Host it yourself so your visitors never load anything from our servers.

1. Install with one command — or download the file
shadcn CLI · React
npx shadcn@latest add https://www.ui-design.co/r/pearl-empty.json
2. Load it and use the element
HTML
<!-- pearl-empty.free.js: download it from the Install section below and host it with your site -->
<script src="/pearl-empty.free.js" defer></script>

<pearl-empty
  kind="empty"
  heading="No projects yet"
  text="Create your first project and it will show up here."
  action="New project"
  size="132"
  theme="light"
></pearl-empty>

<script>
  document.querySelector('pearl-empty').addEventListener('action', () => {
    console.log('pressed');
  });
</script>
3. React + TypeScript (optional)

The shadcn command adds a typed React wrapper for you. Using the file directly? Custom elements work in React as-is; for type checking add:

TypeScript
// pearl-empty.d.ts
declare namespace JSX {
  interface IntrinsicElements {
    'pearl-empty': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
      kind?: 'empty' | 'search' | 'error' | 'done';
      heading?: string;
      text?: string;
      action?: string;
      size?: number | string;
      'heading-level'?: number | string;
      theme?: 'light' | 'dark';
      sound?: boolean | '';
    };
  }
}

Pro · React + TypeScript Pro

One payment of $4.99, yours forever. Use it in unlimited personal and commercial projects; no resale.

  • React component with TypeScript types and the full source — the text takes any React content
  • Sunset, Mint and Mono tints, plus custom tints from Brand Fit
  • The vanilla Web Component with every tint, a demo page, README and license

Attributes & props

NameTypeDefaultDescription
kind 'empty' | 'search' | 'error' | 'done''empty'The picture: a resting pearl; a lens over the well; the pearl cracked in two with a coral halo; a check drawn in one stroke with a green halo.
heading string—The title, e.g. "No projects yet". (React: title.)
text string—One line of explanation. Child content replaces it, so the text can hold a link.
action string—Label of the button under the text; without it there is no button. Pressing it fires action.
size number (px)132Height of the picture; the text and the button follow it within readable limits.
heading-level 2..63Which heading tag the title uses, to fit your page outline.
theme 'light' | 'dark''light'White porcelain or dark.
sound booleanoffA porcelain tap on the action. Also on for everything inside an element with data-ui-sound="on".
tint Pro'aurora' | 'sunset' | 'mint' | 'mono' | object'aurora'Colours of the halo and of the button glow, or a custom tint. error and done keep their coral and green halo. Free build ships Aurora only.

The picture is decorative and hidden from screen readers; the title is a real heading and the action a real button. The ghost outlines lean toward the pointer while it is over the component and drift on their own otherwise; with reduced motion everything rests. It has no background of its own — put it straight into the empty list, table or panel. For a state that announces itself (a failed load), wrap it in an element with role="status" or role="alert". All CSS, no WebGL.

More components