Bug(angular): CopilotKit CSS leaks from Shadow DOM, overriding global layout styles (e.g., ck-input-shadow and :host)
Author: robbertbeukema-labCreated Sep 25, 2026Updated Sep 30, 2026
Labelsbug
♻️ Reproduction Steps
• Create a fresh Angular 18+ application. • Install CopilotKit • Set up a simple global layout where an element should not be full-width • Boot up CopilotKit with a basic HttpAgent. • Open the chatbox. Notice that your global layout immediately breaks because the injected CSS forces elements to width: 100% I created a small app to show the issue: see copilotkit-shadow-dom-repro.zip (also see the two screenshots) copilotkit-shadow-dom-repro.zip
✅ Expected Behavior
When opening the chat, the styling of unrelated elements on the page is not affected.
❌ Actual Behavior
When opening the chat, the styling of unrelated elements on the page is affected.
Screenshots
CopilotKit Version
+-- @copilotkit/[email protected]Logs (Optional)
Source: CopilotKit/CopilotKit