{
  "title": "Response Writer",
  "description": "An auto-scrolling text display that smoothly keeps the latest response always visible",
  "name": "gsap-ai-response-writer",
  "dependencies": [
    "gsap",
    "@gsap/react"
  ],
  "registryDependencies": [
    "scroll-area"
  ],
  "type": "registry:ui",
  "files": [
    {
      "path": "components/paceui/gsap/ai-response-writer.tsx",
      "type": "registry:ui",
      "content": "import { useEffect, useRef } from \"react\";\n\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\n\ntype ResponseWriterProps = {\n    text: string;\n};\n\nexport const AiResponseWriter = ({ text, ...props }: ResponseWriterProps) => {\n    const scrollAreaRef = useRef<HTMLDivElement>(null);\n\n    useEffect(() => {\n        if (scrollAreaRef.current) {\n            const viewport = scrollAreaRef.current?.querySelector(\"div:first-child\");\n            if (viewport) {\n                viewport.scrollTo({\n                    top: viewport.scrollHeight,\n                    behavior: \"smooth\",\n                });\n            }\n        }\n    }, [text]);\n\n    return (\n        <ScrollArea ref={scrollAreaRef} {...props}>\n            <div className=\"pr-4\">\n                <p className=\"text-foreground/80 text-sm whitespace-pre-line\">{text}</p>\n            </div>\n        </ScrollArea>\n    );\n};\n"
    }
  ],
  "mcp": {
    "description": "Provides refined UI interactions and accessible controls. An auto-scrolling text display that smoothly keeps the latest response always visible Configurable props include: {; text: string;. Relies on gsap, @gsap/react, scroll-area. Optimal for building reusable interface elements and user input flows.",
    "tags": [
      "component",
      "gsap",
      "animation"
    ]
  }
}