> For the complete documentation index, see [llms.txt](https://scenegroup.gitbook.io/cavalry/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scenegroup.gitbook.io/cavalry/user-interface/menus/window-menu/align-window.md).

# Align Window

Align and Distribute Shapes

Align and distribute the bounding boxes of Shapes. You can align/distribute based on either the selection or the Composition.

### Based on Selection

To align or distribute Shapes to other Shapes simply select more than one Shape and choose from the options below.

### Based on Composition

Holding the `alt` key while clicking the options below will align or distribute Shapes to the Composition.

{% hint style="info" %}
If you only have one Shape selected then the Alignment options will default to being based on Composition.
{% endhint %}

### Options

#### Alignment

* **Left Align** - horizontally align the left edges of all selected Shapes.
* **Centre Align** - horizontally align the centre of all selected Shapes.
* **Right Align** - horizontally align the right edges of all selected Shapes.
* **Top Align** - vertically align the top edges of all selected Shapes.
* **Middle Align** - vertically align the centre of all selected Shapes.
* **Bottom Align** - vertically align the bottom edges of all selected Shapes.

#### Distribution

* **Horizontal Distribution** - distribute all selected Shapes horizontally.
* **Vertical Distribution** - distribute all selected Shapes vertically.
* **Even Distribution** - distribute all selected Shapes evenly (horizontally and vertically).

{% hint style="success" %}
Alignment and distribution options are selection based by default. To align or distribute based on the [Composition](/cavalry/nodes/shapes/comp-node.md) hold `alt` when choosing an option.
{% endhint %}

{% hint style="info" %}

* Shapes are distributed between the first and last selected Shapes.
* When distributing Shapes based on selection a minimum of three shapes are required. If only two Shapes are selected then **Horizontal** or **Vertical Distribution** will be applied based on the [Composition](/cavalry/nodes/shapes/comp-node.md) (e.g. as if `alt` was held. &#x20;
  {% endhint %}

{% hint style="info" %}
When based on selection, 3 shapes are required for any Distribution. If you have only two Shapes selected then Distribution will be automatically be based on Composition.
{% endhint %}

####
