{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "ai-unlock-animation-shadcnui", "type": "registry:ui", "title": "AI Unlock Animation", "description": "Premium unlock animation with particles, ripples, and loading states", "dependencies": [ "framer-motion", "react" ], "files": [ { "path": "@uitripled/react-shadcn/src/components/motion-core/ai-unlock-animation.tsx", "content": "\"use client\";\n\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { useEffect, useState } from \"react\";\n\ntype AIUnlockAnimationProps = {\n autoPlay?: boolean;\n};\n\nexport function AIUnlockAnimation({ autoPlay = true }: AIUnlockAnimationProps) {\n const [isUnlocking, setIsUnlocking] = useState(false);\n const [isComplete, setIsComplete] = useState(false);\n\n // Auto-start if autoplay is enabled\n useEffect(() => {\n if (autoPlay) {\n setIsUnlocking(true);\n setIsComplete(false);\n const timer = setTimeout(() => {\n setIsComplete(true);\n }, 3000);\n return () => clearTimeout(timer);\n }\n }, [autoPlay]);\n\n const triggerUnlock = () => {\n setIsUnlocking(true);\n setIsComplete(false);\n setTimeout(() => {\n setIsComplete(true);\n }, 3000);\n };\n\n const resetAnimation = () => {\n setIsUnlocking(false);\n setIsComplete(false);\n };\n\n // Generate minimal particles\n const particles = Array.from({ length: 24 }, (_, i) => ({\n id: i,\n angle: (Math.PI * 2 * i) / 24,\n delay: Math.random() * 0.3,\n duration: 1.2 + Math.random() * 0.5,\n }));\n\n return (\n
\n {/* Main content card */}\n \n {/* Ripple effects */}\n \n {isUnlocking && (\n <>\n {[0, 0.2, 0.4].map((delay, i) => (\n \n ))}\n \n )}\n \n\n {/* Particle system */}\n \n {isUnlocking &&\n particles.map((particle) => (\n \n ))}\n \n\n {/* AI Icon */}\n
\n \n {/* Minimal rings */}\n \n {isUnlocking && (\n <>\n \n \n \n )}\n \n\n {/* AI Icon - Simple circle with sparkle */}\n \n \n \n \n \n \n\n {/* Text animations */}\n
\n \n {!isUnlocking && !isComplete && (\n \n Unlock Lifetime Access\n \n )}\n\n {isUnlocking && !isComplete && (\n \n Activating...\n \n )}\n\n {isComplete && (\n \n \n Unlocked\n \n \n Premium features activated\n \n \n )}\n \n\n {/* Minimal loading bar */}\n {isUnlocking && !isComplete && (\n \n \n \n )}\n
\n\n {/* Action buttons */}\n
\n {!isUnlocking && !isComplete && (\n \n Activate\n \n )}\n\n {isComplete && (\n \n Replay\n \n )}\n
\n
\n\n {/* Corner accents - minimal */}\n \n {isUnlocking && (\n <>\n {[\"top-left\", \"top-right\", \"bottom-left\", \"bottom-right\"].map(\n (corner, i) => (\n \n )\n )}\n \n )}\n \n \n
\n );\n}\n", "type": "registry:ui", "target": "components/uitripled/ai-unlock-animation-shadcnui.tsx" } ] }