{ "$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 Are you sure you want to perform this action? This can’t be\n undone and may affect related data.\n
\n