---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://excalidraw.heycactus.ai/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
lang: en
---

# Align and element links

Align and distribute line up or space the shapes you select, and an element link points a shape at another shape on the canvas or at a web address. A shape can also be locked, and a box selection skips it.

> Verified against the product on 2026-11-23

## Align shapes

Align needs at least two units selected. A group of shapes counts as one unit and moves as one. Each command moves the units to an edge or the middle of the selection. The commands are named **Align top** to **Center horizontally**.

| Command | What it does | Shortcut |
| --- | --- | --- |
| **Align top** | Moves each unit so its top edge sits on the top edge of the selection. | Ctrl or Cmd+Shift+Up |
| **Align bottom** | Moves each unit so its bottom edge sits on the bottom edge of the selection. | Ctrl or Cmd+Shift+Down |
| **Align left** | Moves each unit so its left edge sits on the left edge of the selection. | Ctrl or Cmd+Shift+Left |
| **Align right** | Moves each unit so its right edge sits on the right edge of the selection. | Ctrl or Cmd+Shift+Right |
| **Center vertically** | Moves each unit so its middle sits on the middle of the selection, top to bottom. | None |
| **Center horizontally** | Moves each unit so its middle sits on the middle of the selection, left to right. | None |

The align buttons stay hidden until the selection qualifies. A selection that includes a frame has no align command.

## Distribute shapes

Distribute needs at least three units selected, and no frame. Press Alt+H to distribute horizontally, or Alt+V to distribute vertically. The buttons are **Distribute horizontally** and **Distribute vertically**.

Distribute spaces the units evenly between the outermost two, which stay where they are. If the units overlap, their centers are spaced evenly instead.

## Copy a link to an object

An element link is an address that opens this page with the id of one shape or group added to it. The screens call it **Link to object**.

**Copy link to object** is offered when you select one shape, or several shapes that all sit in one group. For a group, the link carries the group's id. Copying puts the link on the clipboard and shows a message.

## Link a shape

A link can point a shape at another shape on the canvas or at a web address.

1. Select one shape.
2. Select **Link to object**. The dialog opens with the title **Link to object** and the text “Click on a shape on canvas or paste a link.”, and its field fills with a link to the selected shape.
3. To link another shape, select it on the canvas while the dialog is open. Its link fills the field.
4. To link a web address, type or paste it into the field.
5. Select **Confirm**, or press Enter. The shape takes the link.

**Link to object** is also a button in the link popup, which Ctrl or Cmd+K opens for one selected shape.

Select **Cancel**, or press Escape, to close the dialog without a change. Confirm with an empty field clears the shape's link, but only if you changed the field.

To remove a link, select the trash icon in the field, then **Confirm**. The trash icon shows only when the shape already has a link and the field has text.

## Follow a link

Hovering the link icon of a shape with an element link shows **Go to target element** instead of the address. Hovering a shape with a web address link shows the address.

A link to a web address opens in a new tab. A link on the same site opens in the same tab.

The canvas can move to the place of a linked object. When a link to an object can't be found on the canvas, the canvas shows “Linked object wasn't found on canvas.”.

## Lock shapes

A locked shape is skipped by a box selection.

1. Select one or more shapes.
2. Press Ctrl or Cmd+Shift+L. The same key unlocks them.

The action is named **Lock** while the selection is unlocked, and **Unlock** once it is locked. With a mix of locked and unlocked shapes, it reads **Unlock** and unlocks them.

Locking clears the selection. Several shapes selected together lock as one unit.

After you lock shapes, a lock icon shows above the top-left corner of the locked shapes. Select it to select those shapes and unlock them. Its title is **Unlock**.

When nothing is selected and some shape is locked, **Unlock all** unlocks every locked shape and selects them.

The lock action is not offered when the selection holds a locked shape inside a frame.

## If something is missing

| What you see | What it means | What to do |
| --- | --- | --- |
| No align buttons | Fewer than two units are selected, or the selection includes a frame. | Select two or more shapes, with no frame. |
| No distribute buttons | Fewer than three units are selected, or the selection includes a frame. | Select three or more shapes, with no frame. |
| No **Copy link to object** | The selection is not one shape, or shapes in one group. | Select one shape, or shapes that all sit in one group. |
| “Linked object wasn't found on canvas.” | The object the link points to is not on this canvas. | Copy the link again from the object, on the canvas it belongs to. |

## Related pages

- [Canvas and toolbar](https://excalidraw.heycactus.ai/tqp2n6-canvas-and-toolbar) shows how to select shapes, which align and distribute need.
- [Groups and frames](https://excalidraw.heycactus.ai/4d5cbg-groups-and-frames) explains groups, which align and distribute treat as one unit, and frames, which they leave out.
- [Keyboard shortcuts](https://excalidraw.heycactus.ai/jhn9a5-keyboard-shortcuts) lists every shortcut in one place.
