Skip to main content

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​

ActionResult
DragPan the diagram.
Double-clickZoom in at the pointer. Double-click again to fit the whole diagram.
Ctrl + scroll on Windows and Linux, Cmd + scroll on macOSZoom at the pointer.
PinchZoom at the pointer.
Scroll, or swipe with one fingerScroll 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​

ButtonAction
− and +Zoom out and zoom in.
1:1 and FitSwitch between zooming in and fitting the whole diagram.
Open in draw.ioOpen the diagram in the draw.io editor to edit, save or export it.
CopyCopy the diagram as draw.io XML. Paste it into draw.io. The small arrow next to it copies the diagram as a PNG image.
DownloadSave 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.
FullscreenFill the chat area with the diagram.
ExpandGive a tall diagram more height. Select it again to collapse the diagram.
LayoutSwitch a Mermaid flowchart between Mermaid's layout and a layered automatic layout.
?Open this help.
Claude has drawn a flowchart using draw.io right in the conversation - use the toolbar below the diagram to pan or zoom, save, download, copy or open it in the online draw.io editor

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.

  1. Click the small arrow next to the Download icon below the diagram.
  2. 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:

  1. Click the small arrow next to Copy below the diagram.
  2. 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.