{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "animated-dialog-shadcnui", "type": "registry:component", "title": "Animated Dialog", "description": "Modal dialog with backdrop fade and spring animation", "registryDependencies": [ "button" ], "dependencies": [ "framer-motion", "react" ], "files": [ { "path": "@uitripled/react-shadcn/src/components/modals/animated-dialog.tsx", "content": "\"use client\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { AnimatePresence, motion, useReducedMotion } from \"framer-motion\";\nimport { X } from \"lucide-react\";\nimport { useState } from \"react\";\n\nexport function AnimatedDialog() {\n const [isOpen, setIsOpen] = useState(false);\n const shouldReduceMotion = useReducedMotion();\n\n const dialogAnimation = shouldReduceMotion\n ? { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 } }\n : {\n initial: { opacity: 0, scale: 0.97, y: 16 },\n animate: { opacity: 1, scale: 1, y: 0 },\n exit: { opacity: 0, scale: 0.97, y: 16 },\n };\n\n return (\n
\n \n\n \n {isOpen && (\n <>\n setIsOpen(false)}\n />\n\n
\n event.stopPropagation()}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"dialog-title\"\n aria-describedby=\"dialog-description\"\n >\n setIsOpen(false)}\n className=\"absolute right-4 top-4 rounded-full border border-border/40 bg-white/5 p-2 text-muted-foreground transition-colors hover:text-foreground\"\n aria-label=\"Close dialog\"\n >\n \n \n \n \n\n \n
\n Confirm\n
\n \n Confirm Action\n \n \n Are you sure you want to perform this action? This can’t be\n undone and may affect related data.\n

\n \n\n \n setIsOpen(false)}\n className=\"flex-1 rounded-full border-border/60 bg-card/60 text-foreground\"\n >\n Cancel\n \n setIsOpen(false)}\n className=\"flex-1 rounded-full bg-primary text-primary-foreground shadow-[0_15px_35px_-20px_rgba(79,70,229,0.6)]\"\n >\n Confirm\n \n \n \n
\n \n )}\n
\n
\n );\n}\n", "type": "registry:component", "target": "components/uitripled/animated-dialog-shadcnui.tsx" } ] }