Custom React chat UI component with scroll handling, Markdown, math formulas, and charts support.
React and TypeScript chat component designed for AI interfaces. It includes custom scroll logic to keep messages properly positioned while streaming text and handling mobile keyboard changes on Android.
Features:
Custom JavaScript scroll math using ResizeObserver to maintain scroll positioning during real-time streaming.
Auto-scroll anchoring when loading older chat history.
Markdown rendering with KaTeX for math equations and Mermaid for diagrams.
Mobile viewport handling for Android and iOS devices.