4 Ways to Connect Shapes

By |2020-04-03T11:50:28+02:00February 27th, 2017|feature, learning|
Reading Time: 3 min

If you draw additional lines between shapes in a diagram, they won’t move with your shapes when you move them around the drawing area. By using actual connectors (not lines), your diagram becomes much more flexible and easy to work with.

There are four different ways you can create connectors between shapes and quickly extend your diagrams in draw.io.

 

1. Focus/mouseover

This creates a duplicate of the shape connected with the standard connector, with an arrow pointing to the new shape by default. Simply clicking on the blue arrow that appears when you hover over a shape creates a duplicate of this shape at a set distance.

If you want to position the shape differently, hold down control (Ctrl), click on the blue arrow or on one of the small blue connection points, hold the button down, drag your mouse to the position you want and release. This will duplicate your shape in the position you want, connected with the standard connector from the connection point that you selected.

Ctrl+drag or click the blue arrow, or Ctrl+drag from a connection point.
Tip: (Shift)+Tab to move the focus.

 

2. Drag and drop

To connect a different shape to an existing connector, select and drag the shape you want from the shape library on the left and drop it onto the circle displayed when you hover over the connector.

To connect a different shape to one that doesn’t yet have a connector attached, select and drag the shape you want from the library over the existing shape until the blue arrows appear, and drop your shape onto the connection direction you want to use. This will automatically locate your new shape a set distance from the existing one, and link them with a connector.

Drag a shape from the sidebar to the blue arrow or circle.
Tip: Drag a new shape over an existing shape and release to replace the shape.

 

3. Select + Sidebar

To add shapes quickly without needing to drag them around, select the connector or shape you want to connect a shape to, then hold down Alt and X, then click on the new shape you want to add in the library on the left. This automatically places the new shape a set distance away from the selected connector or shape and connects them together.

Select a shape or connector, then (Alt+X) and click on a shape in the sidebar.
Tip: Shift+Click replaces the existing selected shape.

 

4. Select + Keyboard

Another way to quickly add multiple different shapes, is by using the keyboard shortcuts. Select an existing shape in your diagram, then press Alt+Shift plus an arrow key (cursor key) on the keyboard to create a connection with a clone of the selected shape in the direction of the key you pressed. To change the shape, keep the mouse in the sidebar, hold down Shift and click on the new shape in the sidebar.

Select an existing shape, then press Alt+Shift+Cursor key.
See: Keyboard Shortcuts

 

You are welcome to open these instructions as an SVG or view them in draw.io directly:
https://jgraph.github.io/drawio-diagrams/diagrams/connect-shapes.svg

Share This Story, Choose Your Platform!

About the Author: