Use the diagram viewer in the chat
Diagrams from your AI assistant appear in the chat in an interactive draw.io viewer. This works in Claude, ChatGPT, VS Code with GitHub Copilot and Cursor, with the MCP App Server.
Pan and zoom
| Action | Result |
|---|---|
| Drag | Pan the diagram. |
| Double-click | Zoom in at the pointer. Double-click again to fit the whole diagram. |
Ctrl + scroll on Windows and Linux, Cmd + scroll on macOS | Zoom at the pointer. |
| Pinch | Zoom at the pointer. |
| Scroll, or swipe with one finger | Scroll the chat, not the diagram. |
Plain scrolling moves the chat, so the diagram doesn't trap your scrolling. In fullscreen, scrolling zooms and dragging with one finger pans.
Use the toolbar
| Button | Action |
|---|---|
| − and + | Zoom out and zoom in. |
| 1:1 and Fit | Switch between zooming in and fitting the whole diagram. |
| Open in draw.io | Open the diagram in the draw.io editor to edit, save or export it. |
| Copy | Copy the diagram as draw.io XML. Paste it into draw.io. The small arrow next to it copies the diagram as a PNG image. |
| Download | Save the diagram as a .drawio file, in apps that allow downloads. The small arrow next to it saves the diagram as a PNG or SVG image. |
| Fullscreen | Fill the chat area with the diagram. |
| Expand | Give a tall diagram more height. Select it again to collapse the diagram. |
| Layout | Switch a Mermaid flowchart between Mermaid's layout and a layered automatic layout. |
| ? | Open this help. |
Download or copy the diagram as an image
Save the diagram as an image to add it to a document, a slide or a web page.
- Click the small arrow next to the Download icon below the diagram.
- Select Download PNG or Download SVG.
The image will be saved to your device. Some apps ask you to confirm the download first.
To copy the diagram as an image instead:
- Click the small arrow next to Copy below the diagram.
- Select Copy as PNG.
The button will show Copied!. Paste the image into another app, such as a document or an email.
Choose a format: Choose PNG for a fixed image in a document, a slide or a chat. Choose SVG when the image needs to stay sharp at any size, for example on a web page or in a wiki.
Edit the image later: The PNG and SVG files contain the diagram. Open them in draw.io to edit the diagram. The image that Copy as PNG copies doesn't contain the diagram. To copy a diagram that you can edit, click Copy.
Light and dark colours: The PNG image uses the light or dark colours that the viewer shows. The SVG image switches between light and dark colours to match where it is shown. A diagram on a dark or coloured page, such as one in the dark theme, keeps its colours in both images.
Note: The arrows and menu entries only appear in apps that allow the viewer to download files or copy images. If an arrow or an entry is missing, click Open in draw.io, then select File > Export as in the draw.io editor.
Watch the diagram being drawn
In apps that stream the diagram while the assistant writes it, such as Claude, the shapes appear one by one and the connectors are drawn between them. When the diagram is complete, the viewer fits it to the chat.
A tall diagram shows its top at a readable size, and the bottom edge fades while there is more below. Click Fit or Expand to see all of it.
Change the diagram
Ask for changes in the same chat, for example "add a cache between the API and the database" or "use the dark theme". The viewer passes the diagram as it is shown, including a layout you switched to, back to the assistant in apps that support this, such as Claude. The assistant changes what you asked for and keeps the rest.
Report a problem
If something looks wrong, such as missing connectors, a broken layout or a viewer that doesn't finish, open an issue on GitHub with a screenshot and your prompt.
Related
- Change and style a diagram in an AI assistant.
- Export a diagram to a PNG image in the draw.io editor.
- Export a diagram to an SVG image in the draw.io editor.
- Set up draw.io in your AI assistant.
- Privacy policy for draw.io in AI assistants.