About
a beautifully structured Dialog component built using Radix UI primitives with custom styling and slots for full flexibility. It offers smooth animations, a blurred backdrop, responsive sizing, and optional close buttons—making it ideal for modals, alerts, or form popups in any modern React app.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Dialog to your project and fits it to your theme.
Code
How Dialog is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import {
Dialog,
DialogBody,
DialogClose,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from '@/components/ui/dialog';
import { Button } from '@/components/ui/button';
export default function ScrollableDialog() {
return (
<Dialog>
<DialogTrigger asChild>
<Button variant="outline">Open FAQs</Button>
</DialogTrigger>
<DialogContent className="max-h-[80vh] overflow-y-auto sm:max-w-[600px]">
<DialogHeader>
<DialogTitle>FAQs</DialogTitle>
<DialogDescription>
All your questions answered below.
</DialogDescription>
</DialogHeader>
<DialogBody className="space-y-6 py-4">
{Array.from({ length: 10 }).map((_, i) => (
<div key={i}>
<h3 className="text-base font-semibold">Question {i + 1}</h3>
<p className="text-muted-foreground text-sm">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed
nisi. Nulla quis sem at nibh elementum imperdiet.
</p>
</div>
))}
</DialogBody>
<DialogFooter>
<DialogClose asChild>
<Button variant="outline">Close</Button>
</DialogClose>
</DialogFooter>
</DialogContent>
</Dialog>
);
}















