Skip to content
Limited Time 40% off for early adopters — Get discount →

References & Refactoring

Last updated:

Mermaid Studio provides references for named elements in supported diagrams along with refactoring support to help you safely rename nodes and navigate your diagrams.

To rename a node and automatically update all its references:

  1. Place your cursor on the node name
  2. Use one of these methods:
    • Press Shift + F6 Shift + F6
    • Right-click and select Refactor -> Rename
  3. Type the new name
  4. Press Return Enter to apply

reference-rename

All references to that node throughout the diagram are updated automatically.

To see everywhere a node is referenced:

  1. Place your cursor on a node
  2. Press Option + F7 Alt + F7
  3. Or right-click and select Find Usages

The results appear in a tool window showing all locations where the node is used.

references-find

Command + click Control + click on any node reference to navigate directly to where the node is defined.

Refactoring is available in the following diagram types:

  • Flowcharts - Node IDs, subgraph IDs, CSS class names, edge IDs
  • Sequence Diagrams - Participants, actors
  • Class Diagrams - Class names, namespace names, attribute names, method names, type references, CSS class names, annotations
  • State Diagrams - State IDs
  • ER Diagrams - Entity names, attribute names, type identifiers, CSS class names
  • User Journey - Actors
  • Gantt - Task IDs
  • Requirement Diagrams - Requirement and element names, CSS class names
  • GitGraph - Branch names
  • C4 Diagrams - Aliases (component, container, person, system names)
  • Mindmaps - Node IDs
  • Sankey - Node names
  • Block Diagrams - Block IDs, CSS class names
  • Kanban - Task IDs
  • Architecture - Service IDs, group IDs, junction IDs
  • Radar - Axis names, curve names
  • Treemap - CSS class names