Visual Output and Custom Renderers
Plugins can render interactive HTML directly in the Claude Code Desktop app's preview pane. This enables richer output formats — interactive diagrams, data tables, test reports, dashboards — that communicate more than prose alone when working with complex or visual information.
Quick Reference
- →Visual output renders interactive HTML in the Desktop app preview pane
- →Only available in Desktop app — not CLI mode or browser extension
- →Claude generates structured data → plugin renders it as HTML → displayed in preview pane
- →Use cases: Mermaid diagrams, D3 charts, interactive test reports, architecture visualizations
- →The render hook: plugin defines how to convert Claude's output to HTML
- →When to use: complex relationships, time-series, hierarchies, comparisons
- →When to skip: simple text output where prose communicates clearly
- →Output is ephemeral — not saved to disk unless the plugin explicitly writes it
What Visual Output Is
Visual output requires the Claude Code Desktop app. It renders in the preview pane alongside the chat. It is not available in the CLI (claude in a terminal), the VS Code extension, or the JetBrains extension.
Visual output allows plugins to intercept Claude's response and render it as interactive HTML. The workflow: Claude generates structured output (JSON, Mermaid syntax, a data table) → the plugin's render function converts it to HTML → the HTML renders in the Desktop preview pane.
The user sees both Claude's prose explanation (in the chat) and the visual representation (in the preview pane). The combination communicates more than either alone — especially for data that is inherently visual.