# Grouping

Grouping elements keeps related items together, making it easier to move, edit, or duplicate them as a unit.

<figure><img src="/files/QN8dzNqFeyJJ2jlJaFbC" alt=""><figcaption></figcaption></figure>

## Grouping Elements

1. **Select the elements**:
   * Draw a selection frame around the elements with a click-and-drag, or hold **Shift** and click individual shapes to build a multi-selection.
2. **Group them**:
   * Click the **Group objects** button in the selection toolbar, **or** press **Ctrl + G** (**Cmd + G** on Mac), **or** right-click and choose **Group** from the context menu.

Once grouped, all formatting-related changes — fill, border, text color, alignment — apply to the group as a whole.

## Ungrouping Elements

1. **Select the group**:
   * Click any element that's part of the group — the whole group selects.
2. **Ungroup**:
   * Click the **Ungroup** button in the toolbar, press **Ctrl + Shift + G** (**Cmd + Shift + G** on Mac), or right-click → **Ungroup**. Elements return to their individual, freely-editable state.

## Additional Features

### Grouping Indicator

* When elements are grouped, YouDesign Models displays a visual indicator, such as a bounding box or highlight, to show their association.

### Saved Grouping State

* The grouping state is saved in YouDesign Models. If you save and reopen the diagram, the grouped elements will remain intact.

### Duplication of Grouped Elements

* You can duplicate grouped elements to replicate the entire structure, maintaining the organized relationship between elements.

By utilizing the grouping feature, you can efficiently manage and organize your diagrams, increasing productivity and clarity in your designs.

## Related

* [Shapes](/models/work-in-the-app/editor/shapes.md) — multi-select modifiers and alignment
* [Layers](/models/work-in-the-app/editor/layers.md) — organize groups across layers
* [Templates](/models/work-in-the-app/editor/templates.md) — save a group as a reusable template
* [Keyboard Shortcuts](/models/reference/keyboard-shortcuts.md) — Ctrl/Cmd + G and Ctrl/Cmd + Shift + G


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ins-pi.com/models/work-in-the-app/editor/grouping.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
