---
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
---

# Groups and frames

Groups and frames both gather shapes, in different ways: a group moves its shapes together, and a frame holds shapes inside a labelled box that clips what is inside it. Press Ctrl+G (Cmd+G on a Mac) to group selected shapes, and press F to pick the frame tool.

> Verified against the product on 2026-11-23

## Group shapes

Select two or more shapes, then press **Ctrl+G** (**Cmd+G** on a Mac) or select the **Group selection** button.

Grouping needs at least two selected shapes, and it does nothing when the selected shapes already form one group.

A frame and its own shapes can't be grouped together.

Once shapes are grouped, selecting one of them selects the whole group, so the group moves as one.

To select one shape inside a group, hold **Ctrl** (**Cmd** on a Mac) and click it.

Shapes from different frames can't stay in their frames once grouped: grouping takes them out of their frames first.

## Ungroup shapes

Select the group, then press **Shift+Ctrl+G** (**Shift+Cmd+G** on a Mac) or select the **Ungroup selection** button.

The button and the shortcut work only when a selected group exists.

Ungrouping removes the group from the shapes that were selected with it.

Shapes that sit in a frame are checked against that frame again after ungrouping.

## Draw a frame

Press **F** to pick the frame tool.

Drag on the canvas with the frame tool to draw the frame.

A frame without a name of its own shows **Frame**, and frame names show by default.

## Wrap shapes in a frame

Select the shapes and choose **Wrap selection in frame**.

The frame is drawn with 16 px of space around the shapes.

An image gets a frame with no space around it.

Shapes you didn't select join the frame too when they lie within the box the frame would make around your selection.

When all of a frame's shapes are selected, the same button reads **Remove frame** and takes them out of the frame instead.

## Put shapes in a frame

Drag shapes onto a frame. A shape joins the frame when it overlaps the frame as you drop it.

A group goes into a frame whole. A frame that takes in only part of a group leaves the whole group out.

A group that contains a frame can't go into a frame.

## Take shapes out of a frame

Drag a shape out of its frame so that it no longer overlaps the frame. It leaves the frame when you drop it.

To take out every shape of a frame at once, select the frame alone and choose **Remove all elements from frame**. The shapes stay on the canvas.

To select every shape in a frame, select the frame alone and choose **Select all elements in frame**.

## How a frame shows its shapes

Frames clip their shapes. A shape inside a frame, or one that overlaps it, is cut at the frame's edge.

Exports clip the same way by default.

Arrows and their labels aren't clipped, so an arrow can run from one frame to another.

An arrow stays in a frame only while one of its ends is in it.

A frame can't be rotated.

## Related pages

- [Canvas and toolbar](https://excalidraw.heycactus.ai/tqp2n6-canvas-and-toolbar) shows where the tools and the zoom controls are.
- [Align and element links](https://excalidraw.heycactus.ai/8heprv-align-and-element-links) lines up selected shapes, and links them.
- [Keyboard shortcuts](https://excalidraw.heycactus.ai/jhn9a5-keyboard-shortcuts) lists every key combination on this page.
- [Command palette](https://excalidraw.heycactus.ai/dmf727-command-palette) finds these actions by name.
