Skip to content
Pebble Pro is here at $49 one timeSee what’s included ↗
Pebble
ComponentsDocsMCPPricing
⌕ Find a component↗Log in
All components 673

Categories

Core inputs & forms46Buttons & actions33Navigation36Overlays & feedback49Data display33Charts & data viz40Cards & layout43Marketing blocks38App shells & pages37AI interfaces40Text & typography effects33Backgrounds & visual effects38Motion & transitions32Numbers & counters32Media34E-commerce333D & interactive36Themed sets40
Start with the essentials.Installation guide ↗Connect your agent ↗
← All componentsOverlays & feedback

Empty State

Empty and zero states with a drawn, layered tile cluster: first use, no results with a query chip, no access, offline, and a compact inline row.

Preview

Start your first project

Projects hold docs, tasks and files for one team.

No matches

“invoice march”

Try fewer words, or search all workspaces.

You need access

Ask Priya, who owns Payroll 2026, to let you in.

You’re offline

Changes are saved on this device and sync when you reconnect.

Webhooks

0 endpoints

No endpoints yet

Send events to your server as they happen.

Install

Add the editable source with the shadcn CLI. Your project also needs the shared theme tokens this component uses. Setup and requirements. The Pebble installer is not published yet.

npx shadcn@latest add https://pebbleui.com/r/empty-state.json

Props

PropTypeDefaultDescription
size"default" | "compact""default"Root. compact is one inline row for tables and lists.
wellbooleantrueRoot. Recessed, top-lit background.
kind"first-use" | "no-results" | "no-access" | "offline""first-use"EmptyStateArt. Which drawn tile cluster to show.
iconReactNode—EmptyStateArt. Replaces the front glyph.
as"h2" | "h3" | "h4" | "p""h3"EmptyStateTitle. Heading level to fit the page outline.
query / onClearstring / () => void—EmptyStateQuery. The empty search as a chip, with a clear button.
Build notes
- Well: `bg-muted/50` with a top radial highlight
  (`radial-gradient(120% 80% at 50% 0%, var(--card), transparent 70%)`) and
  an inset hairline, so it reads as a recess lit from above, not a card.
- Art: 160×72 box. Back tiles are 48 px raised tiles (`shadow-raised-xs`) in
  muted glyph colour, wrapped in motion divs that spring from `x: ±18,
rotate: 0` to `rotate: ∓10°` (stiffness 380, damping 24, 50 ms delay). The
  inner tile adds a CSS hover spread (`translate-x ±1`, `rotate ∓3`) over
  `--motion-base`, so hover and mount never fight over one transform.
- Front tile: 56 px, `shadow-raised-md`, springs from `y: 6, scale: 0.92`.
  Centred with Tailwind's `translate` property, which composes with Motion's
  `transform`.
- Glyphs are our 16 px, 1.5-stroke paths, scaled to 20/24 px.
- Compact: the art collapses to one 36 px tile; the description truncates.

<!-- PEBBLE-LICENSE -->
View source

registry/overlay/empty-state/empty-state.tsx

"use client";

/* PEBBLE-LICENSE
Built by Pebble. Component: empty-state.

First-party license: MIT

The following first-party terms apply only to original Pebble material.

MIT License

Copyright (c) 2026 Praxys Solutions LLC (Pebble)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

THIRD-PARTY NOTICES
These notices apply to identified upstream portions; Pebble terms do not replace or narrow their rights.

Upstream: https://raw.githubusercontent.com/shadcn-ui/ui/main/LICENSE.md
MIT License

Copyright (c) 2023 shadcn

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
END PEBBLE-LICENSE */

import * as React from "react";
import { motion, MotionConfig } from "motion/react";

import { cn } from "@/lib/utils";

type Size = "default" | "compact";

const SizeContext = React.createContext<Size>("default");

export type EmptyStateProps = React.ComponentProps<"div"> & {
  /** `compact` is a single inline row for tables, lists and side panels. */
  size?: Size;
  /** Draw the recessed well behind the content. */
  well?: boolean;
};

export function EmptyState({
  size = "default",
  well = true,
  className,
  ...props
}: EmptyStateProps) {
  return (
    <SizeContext.Provider value={size}>
      <MotionConfig reducedMotion="user">
        <div
          data-slot="empty-state"
          data-size={size}
          className={cn(
            "group/empty text-sm",
            size === "default"
              ? "flex flex-col items-center justify-center gap-4 px-6 py-10 text-center"
              : "flex items-center gap-3 px-3 py-3 text-left",
            // A recessed well, lit from above: it reads as the place where
            // the content will go, not as another card.
            well &&
              "rounded-xl bg-muted/50 bg-[radial-gradient(120%_80%_at_50%_0%,var(--card),transparent_70%)] ring-1 ring-hairline ring-inset dark:bg-muted/30",
            className,
          )}
          {...props}
        />
      </MotionConfig>
    </SizeContext.Provider>
  );
}

/* ------------------------------------------------------------------- Art */

function Glyph({ d, className }: { d: string; className?: string }) {
  return (
    <svg
      viewBox="0 0 16 16"
      fill="none"
      stroke="currentColor"
      strokeWidth="1.5"
      strokeLinecap="round"
      strokeLinejoin="round"
      aria-hidden="true"
      className={className}
    >
      <path d={d} />
    </svg>
  );
}

const art = {
  "first-use": {
    front: "M2.5 4.5v8h11v-6.5H8L6.5 4.5zM8 7.5v3.5M6.25 9.25h3.5",
    left: "M4.5 2.5h5l2 2v9h-7zM6.5 7h3M6.5 9h3M6.5 11h2",
    right: "M3 3.5h10v9H3zM3 10l3-2.5 2.5 2 2-1.5L13 10M10.5 6h.01",
  },
  "no-results": {
    front: "M7 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM10 10l3.5 3.5",
    left: "M4.5 2.5h5l2 2v9h-7zM6.5 7h3M6.5 9h3",
    right: "M4.5 2.5h5l2 2v9h-7zM6.5 7h1.5M6.5 9h3M6.5 11h2",
  },
  "no-access": {
    front: "M4.5 7.5h7v6h-7zM6 7.5V5.5a2 2 0 0 1 4 0v2M8 10v1.5",
    left: "M4.5 2.5h5l2 2v9h-7zM6.5 7h3M6.5 9h3M6.5 11h2",
    right: "M3 3.5h10v9H3zM5 6.5h6M5 9h4",
  },
  offline: {
    front: "M4.5 12a3 3 0 0 1-.5-6 4 4 0 0 1 7.6-1.2A3 3 0 0 1 12 12zM2.5 2.5l11 11",
    left: "M3 12.5v-1M6 12.5v-3M9 12.5v-5M12 12.5v-7",
    right: "M8 12.5h.01M5.5 10a3.5 3.5 0 0 1 5 0M3.5 8a6.5 6.5 0 0 1 9 0",
  },
} as const;

export type EmptyStateKind = keyof typeof art;

const tile =
  "absolute flex items-center justify-center rounded-xl bg-card ring-1 ring-hairline inset-shadow-highlight";

export type EmptyStateArtProps = Omit<React.ComponentProps<"div">, "children"> & {
  kind?: EmptyStateKind;
  /** Replace the front glyph. */
  icon?: React.ReactNode;
};

/**
 * A drawn cluster of three tiles: two quiet ones fanned behind, one raised in
 * front with the main glyph. The back tiles fan out on mount and a little
 * further when the empty state is hovered.
 */
export function EmptyStateArt({
  kind = "first-use",
  icon,
  className,
  ...props
}: EmptyStateArtProps) {
  const size = React.useContext(SizeContext);
  const glyphs = art[kind];
  if (size === "compact") {
    return (
      <div
        data-slot="empty-state-art"
        aria-hidden="true"
        className={cn(
          "flex size-9 shrink-0 items-center justify-center rounded-lg bg-card text-muted-foreground shadow-raised-xs ring-1 inset-shadow-highlight ring-hairline [&_svg]:size-4",
          kind === "no-access" && "text-foreground",
          className,
        )}
        {...props}
      >
        {icon ?? <Glyph d={glyphs.front} />}
      </div>
    );
  }
  const spring = { type: "spring", stiffness: 380, damping: 24, mass: 0.8 } as const;
  return (
    <div
      data-slot="empty-state-art"
      data-kind={kind}
      aria-hidden="true"
      className={cn("relative h-[4.5rem] w-40", className)}
      {...props}
    >
      <motion.div
        initial={{ x: 18, rotate: 0, opacity: 0 }}
        animate={{ x: 0, rotate: -10, opacity: 1 }}
        transition={{ ...spring, delay: 0.05 }}
        className="absolute top-3 left-4"
      >
        <div
          className={cn(
            tile,
            "relative size-12 text-muted-foreground/70 shadow-raised-xs transition-transform duration-(--motion-base) ease-enter group-hover/empty:-translate-x-1 group-hover/empty:-rotate-3 motion-reduce:transition-none [&_svg]:size-5",
          )}
        >
          <Glyph d={glyphs.left} />
        </div>
      </motion.div>
      <motion.div
        initial={{ x: -18, rotate: 0, opacity: 0 }}
        animate={{ x: 0, rotate: 10, opacity: 1 }}
        transition={{ ...spring, delay: 0.05 }}
        className="absolute top-3 right-4"
      >
        <div
          className={cn(
            tile,
            "relative size-12 text-muted-foreground/70 shadow-raised-xs transition-transform duration-(--motion-base) ease-enter group-hover/empty:translate-x-1 group-hover/empty:rotate-3 motion-reduce:transition-none [&_svg]:size-5",
          )}
        >
          <Glyph d={glyphs.right} />
        </div>
      </motion.div>
      <motion.div
        initial={{ y: 6, scale: 0.92, opacity: 0 }}
        animate={{ y: 0, scale: 1, opacity: 1 }}
        transition={spring}
        className={cn(
          tile,
          "top-0 left-1/2 size-14 -translate-x-1/2 text-foreground shadow-raised-md [&_svg]:size-6",
          kind === "no-access" && "text-foreground",
          kind === "offline" && "text-muted-foreground",
        )}
      >
        {icon ?? <Glyph d={glyphs.front} />}
        {kind === "first-use" && (
          // The one ember mark: this is where something new begins.
          <span className="absolute -top-1 -right-1 size-2.5 rounded-full bg-accent ring-2 ring-card" />
        )}
      </motion.div>
    </div>
  );
}

/* ------------------------------------------------------------------ Text */

export function EmptyStateContent({ className, ...props }: React.ComponentProps<"div">) {
  const size = React.useContext(SizeContext);
  return (
    <div
      data-slot="empty-state-content"
      className={cn(
        size === "default"
          ? "grid max-w-sm justify-items-center gap-1.5"
          : "grid min-w-0 flex-1 gap-0.5",
        className,
      )}
      {...props}
    />
  );
}

export function EmptyStateTitle({
  className,
  as: Comp = "h3",
  ...props
}: React.ComponentProps<"h3"> & { as?: "h2" | "h3" | "h4" | "p" }) {
  const size = React.useContext(SizeContext);
  return (
    <Comp
      data-slot="empty-state-title"
      className={cn(
        "font-medium tracking-[-0.01em] text-balance",
        size === "default" ? "text-base" : "text-[13px]",
        className,
      )}
      {...props}
    />
  );
}

export function EmptyStateDescription({ className, ...props }: React.ComponentProps<"p">) {
  const size = React.useContext(SizeContext);
  return (
    <p
      data-slot="empty-state-description"
      className={cn(
        "text-pretty text-muted-foreground",
        size === "default" ? "text-sm leading-relaxed" : "truncate text-[13px]",
        className,
      )}
      {...props}
    />
  );
}

export function EmptyStateActions({ className, ...props }: React.ComponentProps<"div">) {
  const size = React.useContext(SizeContext);
  return (
    <div
      data-slot="empty-state-actions"
      className={cn(
        "flex flex-wrap items-center gap-2",
        size === "default" ? "justify-center pt-1" : "shrink-0",
        className,
      )}
      {...props}
    />
  );
}

export type EmptyStateQueryProps = Omit<React.ComponentProps<"span">, "children"> & {
  query: string;
  /** Clears the query; renders the × button when set. */
  onClear?: () => void;
};

/** The search that came up empty, as a chip with a clear button. */
export function EmptyStateQuery({ query, onClear, className, ...props }: EmptyStateQueryProps) {
  return (
    <span
      data-slot="empty-state-query"
      className={cn(
        "inline-flex h-7 max-w-full items-center gap-1 rounded-full bg-card pr-1 pl-2.5 text-[13px] shadow-raised-xs ring-1 inset-shadow-highlight ring-hairline",
        !onClear && "pr-2.5",
        className,
      )}
      {...props}
    >
      <Glyph
        d="M7 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM10 10l3.5 3.5"
        className="size-3.5 shrink-0 text-muted-foreground"
      />
      <span className="truncate font-medium">&ldquo;{query}&rdquo;</span>
      {onClear && (
        <button
          type="button"
          aria-label={`Clear search “${query}”`}
          onClick={onClear}
          className="inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-[background-color,color,transform] duration-(--motion-fast) hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none active:scale-90 motion-reduce:transition-none motion-reduce:active:scale-100"
        >
          <Glyph d="M5 5l6 6M11 5l-6 6" className="size-3" />
        </button>
      )}
    </span>
  );
}
Pebble

Small details.
Better interfaces.

React components to explore, make your own, and build on.

Library

  • Components
  • Installation
  • Pricing

Resources

  • For agents
  • About
  • Support

Legal

  • License
  • Terms
  • Privacy
  • Final sale

Built by Pebble

A product of Praxys Solutions LLC ↗

Pebble Pro is live

$49 one time, lifetime updates ↗