Components
Loading preview...
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.
npx shadcn@latest add https://21st.dev/r/sshahaider/dialogimport React from 'react';
import {
Dialog,
DialogBody,
DialogClose,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from '@/components/ui/dialog';
import { Button } from '@/components/ui/button';
export default function Default() {
return (
<Dialog>
<DialogTrigger asChild>
<Button variant="outline">Hello there!</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Hello there!</DialogTitle>
<DialogDescription>This is a basic message.</DialogDescription>
</DialogHeader>
<DialogBody>
<p>This is a simple dialog without a form.</p>
</DialogBody>
<DialogFooter>
<DialogClose asChild>
<Button variant="outline">Close</Button>
</DialogClose>
<Button>Okay</Button>
</DialogFooter>
</DialogContent>
</Dialog>
);
}