# Empty (Lumen Halo): prompt.md (v1.0.0)

- id: `lumen-empty` · version 1.0.0 · component · free
- category: Feedback
- build: Base UI (one set of files; its dependencies follow the build)
- install (this build): `npx shadcn@latest add https://beautiful-ui.dev/r/lumen-empty.json`
- npm dependencies: class-variance-authority@^0.7
- registry dependencies: utils, https://beautiful-ui.dev/r/lumen-foundation.json
- docs: https://beautiful-ui.dev/components/lumen-empty
- The install command carries everything this item needs (files, CSS, tokens, npm and registry dependencies). Prefer it to copying source by hand.

The dark panel before it has anything to say: a row of unlit cells, a line in Lumen's voice and the one action that fills it. shadcn's Empty, cut from Lumen glass.

## Build it
- Stack: React 19 (`ref` is a plain prop), TypeScript, Tailwind CSS v4 utilities, a shadcn-initialised project with the `@/*` alias.
- Packages: `class-variance-authority@^0.7`.
- Files: `components/ui/lumen/empty.tsx`.
- Registry dependencies, installed with it automatically: shadcn `utils` (cn), `lumen-foundation`.
- Builds: one set of files for both, but its dependencies come in Base UI and Radix builds. Install the one that matches the project (see Install): a free item's bare URL installs the Base UI build of it and its dependencies.
- Exports to keep: `Empty`, `EmptyHeader / EmptyMedia / EmptyTitle / EmptyDescription`, `EmptyContent`, and every exported type.
- CSS: the install merges this item's rules (the registry `css` field) into your global stylesheet, in `@layer components`, and adds the lumen foundation (tokens, keyframes, motion levels) once. Nothing to import by hand.
- Re-running `add` (or `--overwrite`) re-applies those rules: put overrides in your own CSS, never in the installed rules.
- Tokens: retheme with the `--lumen-*` custom properties (`--lumen-accent`, `--lumen-accent-text`, `--lumen-bad`, `--lumen-bad-text`, `--lumen-focus`, `--lumen-good`, `--lumen-good-text`, `--lumen-hairline`, `--lumen-ink`, `--lumen-muted-ink`, `--lumen-series-1`, `--lumen-series-2`, `--lumen-series-3`, `--lumen-series-4`, `--lumen-series-5`, `--lumen-series-6`, `--lumen-warn`, `--lumen-warn-text`); this item's CSS also reads `--lumen-font-sans`, `--lumen-radius-k`. Never add Tailwind colour classes inside the component.

```tsx
import { Empty, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "@/components/ui/lumen/empty";
```

## Parts

| Part | data-slot | What it is for |
|---|---|---|
| `Empty` | `empty` | The panel. |
| `EmptyHeader / EmptyMedia / EmptyTitle / EmptyDescription` | `empty-header` | The message. |
| `EmptyContent` | `empty-content` | The actions. |

Style a part with `[data-slot="<slot>"]` selectors or its `className`; keep the attributes when editing.

## Sound
- Keep every `data-slot` and `data-sound` attribute: the sound layer reads them.
- Installing this item adds no audio. Nothing plays until the app mounts `GlassSoundProvider` once (install: `npx shadcn@latest add https://beautiful-ui.dev/r/glass-sound.json`, import from `@/components/beautiful-ui/glass-sound`); `GlassSoundToggle` is its mute control. Without a provider the audio engine never loads.

## Match the original
- Read `components/ui/lumen/empty.tsx` as the reference implementation before changing or recreating anything, and match it: sizes, colours per theme, motion timings, copy and behaviour.
- If you deviate (a prop you can't honour, a style you changed, a dependency you swapped), say so in your reply, part by part.
- Keep the accessibility contract, the keyboard map and the motion levels listed below.

## Use it when
- empty state, no results, zero state, blank slate, shadcn empty, Lumen
- A list, table or chart with nothing in it yet

### Not when
- Errors: use Alert

## Mistakes
- Always offer the next step

## Usage

```tsx
import { Empty, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "@/components/ui/lumen/empty";

<Empty>
  <EmptyHeader>
    <EmptyMedia />
    <EmptyTitle>No dashboards yet</EmptyTitle>
    <EmptyDescription>Start from a template or a blank page.</EmptyDescription>
  </EmptyHeader>
</Empty>
```

## Props

| Prop | Type | Default | What it does |
|---|---|---|---|
| `EmptyMedia variant` | `"default" \| "icon"` | `"default"` | Unlit cells, or your icon in a glass tile. |

Full docs: https://beautiful-ui.dev/components/lumen-empty

## Customising
- Colours: set the `--lumen-*` tokens on `:root`, or on a container with the `lumen-scope` class to retheme one area. Add the `lumen-inherit` class to follow your shadcn palette instead (`--chart-N`, `--destructive`).
- Dark mode follows the `.dark` class on an ancestor (the shadcn and next-themes convention).
- Update later by re-running the install with `--overwrite` (review the diff if you edited it). Changelog: https://beautiful-ui.dev/r/changelog.json

## Keyboard

| Keys | Action |
|---|---|
| — | Not focusable |

## Motion inventory

| Interaction | What moves |
|---|---|
| None | Still |

## Accessibility contract (preserve when editing)
- Plain text; put the action in a real button

## Install

Base UI project (a base-* style in components.json):

```bash
npx shadcn@latest add https://beautiful-ui.dev/r/lumen-empty.json
```

Radix project (a radix-*, new-york or default style):

```bash
npx shadcn@latest add https://beautiful-ui.dev/r/radix-nova/lumen-empty.json
```

Or add the `@beautiful-ui` registry to components.json and run `npx shadcn@latest add @beautiful-ui/lumen-empty`: the CLI picks the build from your style.

## Credits
- Built on shadcn/ui (https://ui.shadcn.com)

## Source (Base UI build)

### components/ui/lumen/empty.tsx

```tsx
/**
 * Empty (Lumen Halo) v1.0.0 · Beautiful UI
 * Docs: https://beautiful-ui.dev/components/lumen-empty · Agent prompt: https://beautiful-ui.dev/md/lumen-empty.md
 * Licensed to the purchaser under the Beautiful UI license: https://beautiful-ui.dev/license
 */
import * as React from "react";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";

/*
 * Lumen Empty. shadcn's Empty in Lumen Halo: the dark panel before it has anything to say. The
 * default media is a row of unlit cells; "icon" puts your icon in a glass tile. Same exports,
 * variants and data-slots as shadcn; server-safe.
 */

function Empty({ className, ...props }: React.ComponentProps<"div">) {
  return <div data-slot="empty" className={cn(`lumen-empty`, className)} {...props} />;
}

function EmptyHeader({ className, ...props }: React.ComponentProps<"div">) {
  return <div data-slot="empty-header" className={cn(`lumen-empty-header`, className)} {...props} />;
}

const emptyMediaVariants = cva(`lumen-empty-media`, {
  variants: { variant: { default: "", icon: `lumen-empty-media-icon` } },
  defaultVariants: { variant: "default" },
});

function EmptyMedia({ className, variant = "default", children, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>) {
  return (
    <div data-slot="empty-icon" data-variant={variant} className={cn(emptyMediaVariants({ variant, className }))} {...props}>
      {children ?? (
        <span aria-hidden className={`lumen-empty-cells`}>
          <i />
          <i />
          <i />
          <i />
        </span>
      )}
    </div>
  );
}

function EmptyTitle({ className, ...props }: React.ComponentProps<"div">) {
  return <div data-slot="empty-title" className={cn(`lumen-empty-title`, className)} {...props} />;
}

function EmptyDescription({ className, ...props }: React.ComponentProps<"p">) {
  return <div data-slot="empty-description" className={cn(`lumen-empty-description`, className)} {...props} />;
}

function EmptyContent({ className, ...props }: React.ComponentProps<"div">) {
  return <div data-slot="empty-content" className={cn(`lumen-empty-content`, className)} {...props} />;
}

export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia };
```

### CSS (the registry `css` / `cssVars`, merged into the global stylesheet by the shadcn CLI)

```css
@layer components {
  .lumen-empty {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 32px 24px;
    border-radius: calc(18px * var(--lumen-radius-k, 1));
    border: 1px dashed var(--gc-hair);
    text-align: center;
    text-wrap: balance;
    color: var(--gc-ink);
    font: 400 13.5px/1.5 var(--lumen-font-sans, var(--font-sans, var(--font-geist, var(--font-geist-sans, 'Geist')))), system-ui, sans-serif;
  }
  .lumen-empty-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 360px;
  }
  .lumen-empty-media {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
  }
  .lumen-empty-media-icon {
    width: 40px;
    height: 40px;
    border-radius: calc(12px * var(--lumen-radius-k, 1));
    background: color-mix(in srgb,var(--gc-ink) 6%,transparent);
    box-shadow: inset 0 0 0 1px var(--gc-hair);
  }
  .lumen-empty-media-icon>svg {
    width: 18px;
    height: 18px;
  }
  .lumen-empty-cells {
    display: flex;
    gap: 4px;
  }
  .lumen-empty-cells>i {
    width: 8px;
    height: 8px;
    border-radius: calc(2px * var(--lumen-radius-k, 1));
    background: var(--gc-cellOff);
  }
  .lumen-empty-title {
    font: 600 15px/1.35 var(--lumen-font-sans, var(--font-sans, var(--font-geist, var(--font-geist-sans, 'Geist')))), system-ui, sans-serif;
    letter-spacing: -.01em;
  }
  .lumen-empty-description {
    color: var(--gc-sec);
  }
  .lumen-empty-description a {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
  .lumen-empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 360px;
    min-width: 0;
  }
}
```

The lumen foundation (the tokens listed above, keyframes and motion levels) installs once with the first component; its CSS is public at https://beautiful-ui.dev/r/lumen-foundation.json.
