Generate more types of diagrams in draw.io with the new sparkle tool

draw.io 01 Dec 2025

Share:

The smart templates feature has been upgraded - click on the new Generate tool (sparkle button) in the draw.io toolbar to generate a diagram. The Generate tool uses multiple AI generators to support a wider range of diagrams, including interface mock-ups, infrastructure diagrams, Mermaid diagrams and more.
The new generate diagram tool

Tips:

  • The Generate tool is available in all the draw.io editor themes that have a toolbar - Classic, Atlas, Simple and Sketch - in the Atlassian draw.io apps and our online editor.
  • While you can still generate a diagram from within the template library as a smart template, you can also edit queries via the Generate tool.

Generate a diagram

Make sure you write the type of diagram you want at the start of the query - this is what decides which AI generator is chosen, as each generator is good at only a small subset of diagrams.

  1. Open the Generate dialog - click on the sparkle button.
    Click on the Generate tool in the draw.io toolbar to open the Generate diagram dialog
  2. Describe the diagram you want to generate, then press Enter or click on Send.
    Write a description of your diagram and send your query in the draw.io Generate tool
  3. Your query will be sent to the AI tools to analyse and generate a preview of a diagram - this may take a little time. If the result doesn’t match your query, click Refresh to regenerate a different version - keep in mind that AI tools may not return sensible results.
    If your diagram
  4. Click + to add the diagram to the drawing canvas.
    Insert the generated diagram on the drawing canvas in draw.io
  5. Online draw.io editor only: To open the diagram in a new browser tab and new diagram instead of inserting it on the current diagram page click on Open in New Window.
    Open a generated diagram in a new draw.io to generate a new or updated version of the diagram

The colours in generated diagrams may not be optimised for draw.io’s adaptive colour feature. You may need to tweak shape and diagram styles after inserting the generated diagram on the drawing canvas. In the example below, the generated diagram was much easier to see in dark mode.

Edit your diagram generation query in draw.io to generate a new or updated version of the diagram

Some diagrams, like the Gantt chart above, will be generated in Mermaid code instead of being converted to native draw.io shapes. Hover over the diagram on the drawing canvas to see this Mermaid code, and double click on it to edit it.
Edit the generated mermaid diagram in draw.io

Tip: If you want to the generator to use Mermaid, make sure you write that in your query, either before or directly after the diagram type.

Preview the generated diagram

While you can hover over the diagram for a small preview, to see a larger preview, click on the Preview magnifying class.
Hover over the generated diagram to see a small preview in draw.io   Click on the Preview tool to see a larger preview of your generated diagram in draw.io

Edit your query

  1. Click on Edit (pen icon) to paste that query text in the description box.
  2. Refine the query and click Send to generate an updated diagram.
    Edit your diagram generation query in draw.io to generate a new or updated version of the diagram

The edited queries do not overwrite the earlier generated diagrams - you can add any or all of these to the diagram canvas.
You can insert each of the generated diagrams - editing a query does not overwrite the generated example in draw.io

Tip: To copy just the text of your query, click the copy icon next to the pen.

Delete a query

  • Click Remove (rubbish bin) to delete a query from the Generate dialog.
  • To clear the dialog complete, remove all queries.
    Click on the Remove trash can icon to remove a query from the draw.io generate diagram tool

Learn about when it makes sense to generate diagrams and how to write better queries for more accurate diagram generation.

For Atlassian administrators: enable smart templates in draw.io for Confluence Cloud.

To disable this feature completely, hide the sparkle button and diagram offline, set the data lockdown option in the draw.io configuration.

See more examples of smart templates and generated diagrams.
The new generate diagram tool

Follow us on GitHub, Twitter, Facebook.

Share: