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 draw.io MCP app.

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.
DownloadSave the diagram as a .drawio file, in apps that allow downloads.
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.

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.