How the Inline Visualizer works
mainThe Inline Visualizer renders rich visual content like SVG diagrams, HTML interactive widgets, and charts directly within a chat conversation using a sandboxed iframe.
Content is provided as raw HTML or SVG fragments. The client automatically detects the mode based on the starting tag:
- SVG mode: Output starts with
<svg>. The client wraps this in a card. Best for static diagrams. - HTML mode: Raw HTML fragments. Best for interactive content (sliders, tabs, charts, controls). You can embed
<svg>elements inside HTML mode.
Important: Do not include <!DOCTYPE>, <html>, <head>, or <body> tags. Only provide the content fragments.
<svg width="100%" viewBox="0 0 680 400">
<!-- SVG content here -->
</svg>