npx shadcn@4.23.1 add @goop/trail-emptyEmpty
FreeAn empty state, what a view or a section shows when it holds nothing yet, with a line of help and an action to add the first item, for React and Tailwind CSS. Free, MIT.
What an agent sees
- EmptyHeaderThe words' column
- EmptyMediaThe caller's picture or icon
- EmptyTitleThe few words
- EmptyDescriptionOne short sentence under the title saying why the space is empty or what to do next
- EmptyContentThe row of actions under the words
import { Empty, EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription, EmptyContent } from '@/components/ui/goop/empty';
<Empty>
<EmptyHeader>
<EmptyTitle>No notes yet</EmptyTitle>
<EmptyDescription>Notes you write show up here.</EmptyDescription>
</EmptyHeader>
</Empty>Pick a row look (the row alone, the row with its quiet add button) or switch the variant and take away or bring back its picture, its line under the title and its action. New note makes nothing: its press is counted.
When to use
- An empty state, what a view or a section shows when it holds nothing yet, with a line of help and an action to add the first item.
- Also called: empty state.
Installation
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Empty on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing.
npx shadcn@4.23.1 add @goop/trail-emptyAdd the Goop Empty to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { Empty, EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription, EmptyContent } from '@/components/ui/goop/empty';
<Empty>
<EmptyHeader>
<EmptyTitle>No notes yet</EmptyTitle>
<EmptyDescription>Notes you write show up here.</EmptyDescription>
</EmptyHeader>
</Empty>- Fits: app, chat, flow, inbox, list, states (their recipes).
- height, width, padding, gap, corner, border, background, shadow, text: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| variant | default | outline = default |
| Part | What it is |
|---|---|
| EmptyHeader | The words' column |
| EmptyMedia | The caller's picture or icon |
| EmptyTitle | The few words; takes asChild |
| EmptyDescription | One short sentence under the title saying why the space is empty or what to do next |
| EmptyContent | The row of actions under the words; put the theme's Buttons in it, spaced to match the empty state |
- Class recipes (cva): emptyVariants (Empty)
- data-slot values (to select a part by): empty, empty-content, empty-description, empty-header, empty-media, empty-row, empty-title
Accessibility
- hover, active, focus-visible, focus-within: the browser's own (:hover, :active, :focus-visible, :focus-within): write nothing
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.