{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "animated-quote-block-shadcnui", "type": "registry:ui", "title": "Animated Quote Block", "description": "Quote that types itself in, pauses, then subtly breathes", "dependencies": [ "framer-motion", "react" ], "files": [ { "path": "@uitripled/react-shadcn/src/components/motion-core/animated-quote-block.tsx", "content": "\"use client\";\n\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { useEffect, useState } from \"react\";\n\ntype AnimatedQuoteBlockProps = {\n quote?: string;\n author?: string;\n typingSpeed?: number;\n};\n\nexport function AnimatedQuoteBlock({\n quote = \"The only way to do great work is to love what you do.\",\n author = \"Steve Jobs\",\n typingSpeed = 50,\n}: AnimatedQuoteBlockProps) {\n const [displayedText, setDisplayedText] = useState(\"\");\n const [isTyping, setIsTyping] = useState(true);\n const [showPulse, setShowPulse] = useState(false);\n\n useEffect(() => {\n let index = 0;\n const timer = setInterval(() => {\n if (index < quote.length) {\n setDisplayedText(quote.slice(0, index + 1));\n index++;\n } else {\n setIsTyping(false);\n setShowPulse(true);\n clearInterval(timer);\n }\n }, typingSpeed);\n\n return () => clearInterval(timer);\n }, [quote, typingSpeed]);\n\n return (\n
\n \n
\"
\n\n
\n \n {isTyping ? (\n \n {displayedText}\n \n \n ) : (\n \n {quote}\n \n )}\n \n
\n\n
\n - {author}\n
\n \n
\n );\n}\n", "type": "registry:ui", "target": "components/uitripled/animated-quote-block-shadcnui.tsx" } ] }