About
A modal dialog window with a title, description, and footer actions that fades and scales in over a backdrop, built on the Base UI dialog primitive.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Animated Dialog to your project and fits it to your theme.
Code
How Animated Dialog is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import {
Dialog,
DialogClose,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
export default function DialogDemo() {
return (
<div className="flex min-h-[420px] w-full items-center justify-center">
<Dialog>
<DialogTrigger className="inline-flex h-8 cursor-pointer items-center justify-center rounded-lg bg-primary px-3 text-sm font-medium text-primary-foreground hover:bg-primary/80">
Edit profile
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Edit profile</DialogTitle>
<DialogDescription>
Make changes to your profile here. Click save when you're
done.
</DialogDescription>
</DialogHeader>
<div className="flex flex-col gap-3">
<div className="flex flex-col gap-1.5">
<label htmlFor="name" className="text-sm font-medium">
Name
</label>
<input
id="name"
defaultValue="Pedro Duarte"
className="h-8 rounded-lg border border-border bg-background px-2.5 text-sm outline-none focus-visible:ring-3 focus-visible:ring-ring/50"
/>
</div>
<div className="flex flex-col gap-1.5">
<label htmlFor="username" className="text-sm font-medium">
Username
</label>
<input
id="username"
defaultValue="@peduarte"
className="h-8 rounded-lg border border-border bg-background px-2.5 text-sm outline-none focus-visible:ring-3 focus-visible:ring-ring/50"
/>
</div>
</div>
<DialogFooter>
<DialogClose className="inline-flex h-8 cursor-pointer items-center justify-center rounded-lg border border-border px-3 text-sm font-medium hover:bg-muted">
Cancel
</DialogClose>
<button className="inline-flex h-8 cursor-pointer items-center justify-center rounded-lg bg-primary px-3 text-sm font-medium text-primary-foreground hover:bg-primary/80">
Save changes
</button>
</DialogFooter>
</DialogContent>
</Dialog>
</div>
);
}












