Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-alert-dialog.json --yes

Alert dialog

Pro

A modal that asks a person to confirm or cancel before an action that cannot be undone, such as a delete, for React and Tailwind CSS. Part of Goop Pro.

Press Delete on a list: the delete answer stays off until its name is typed exactly; Keep it or Escape leaves the list; a confirmed delete removes it from the list. Pick a look for a plain, a long or a title-only question. The lists live in the page only; picking a look brings them back.

When to use

  • A modal that asks a person to confirm or cancel before an action that cannot be undone, such as a delete.
  • Also called: confirm dialog or confirmation modal.

When not to use

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 Alert dialog on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-alert-dialog.json --yes
PROMPT
Add the Goop Alert dialog to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { AlertDialogBody, AlertDialogAction } from '@/components/ui/goop/alert-dialog';

import {
  AlertDialog,
  AlertDialogCancel,
  AlertDialogContent,
  AlertDialogDescription,
  AlertDialogDestructiveAction,
  AlertDialogFooter,
  AlertDialogHeader,
  AlertDialogTitle,
  AlertDialogTrigger,
} from '@/components/ui/goop/alert-dialog';
import { Button } from '@/components/ui/goop/button';

function DeleteRoute({ onDelete }: { onDelete: () => void }) {
  return (
    <AlertDialog>
      <AlertDialogTrigger asChild>
        <Button variant="outline">Delete route</Button>
      </AlertDialogTrigger>
      <AlertDialogContent>
        <AlertDialogHeader>
          <AlertDialogTitle>Delete the ridge path route?</AlertDialogTitle>
          <AlertDialogDescription>Its 6 stops and 14 field notes are removed for the whole crew.</AlertDialogDescription>
        </AlertDialogHeader>
        <AlertDialogFooter>
          <AlertDialogCancel>Keep it</AlertDialogCancel>
          <AlertDialogDestructiveAction hold onConfirm={onDelete}>
            Delete route
          </AlertDialogDestructiveAction>
        </AlertDialogFooter>
      </AlertDialogContent>
    </AlertDialog>
  );
}
  • width, padding, gap: add no class for these.

API reference

Options
OptionTypeWhat it does
open?boolean
defaultOpen?boolean
onOpenChange?(open: boolean) => void
  • Takes every prop of Dialog but modal (its page: dialog.md)
  • State: open (open / defaultOpen / onOpenChange)
Parts
PartWhat it is
AlertDialogTriggerWraps the control that opens the alert; put the theme's Button inside with asChild; also takes asChild?: boolean
AlertDialogContentThe panel; put AlertDialogHeader in it, then AlertDialogBody when it holds a field, then AlertDialogFooter; also takes container?: HTMLElement | null
AlertDialogHeaderThe alert's top; put AlertDialogTitle and AlertDialogDescription in it
AlertDialogTitleThe question, which names the panel
AlertDialogDescriptionWhat answering it does, which describes the panel
AlertDialogBodyThe alert's middle, between AlertDialogHeader and AlertDialogFooter
AlertDialogFooterThe row for the two answers, AlertDialogCancel and then the confirming one
AlertDialogCancelThe answer that backs out and closes the alert; it takes the focus as the alert opens; also takes type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean; loading?: boolean = false; loadingLabel?: string = 'Loading'
AlertDialogActionThe confirming answer, last in the footer; for a destructive one use AlertDialogDestructiveAction; also takes type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean; loading?: boolean = false; loadingLabel?: string = 'Loading'
AlertDialogDestructiveActionThe confirming answer where confirming deletes or cannot be undone; also takes type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean; icon?: IconName = 'alert-circle'; hold?: boolean = false; onConfirm?: () => void; onFinished?: () => void; holdDuration?: number; holdHint?: string = 'Hold to confirm'; confirmLabel?: string; confirmedLabel?: string = 'Confirmed'; loading?: boolean = false; loadingLabel?: string = 'Loading'
  • Required: AlertDialogTitle, inside AlertDialogContent
  • data-slot values (to select a part by): alert-dialog-body, alert-dialog-content, alert-dialog-description, alert-dialog-footer, alert-dialog-header, alert-dialog-header-content, alert-dialog-title

Keyboard

KeyWhat it does
EscapeClose
TabMove to the next button

Accessibility

  • The part itself answers the keys above.

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.

goop.so/themes/meadow/components/alert-dialog.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-alert-dialog.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.