# Adding components

### Adding a component

The Component library is where you will find all the UI elements you can add to your project. Open  it by clicking on the 'add icon' <img src="https://911720298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkLBGzn2hXrIMe50klQCv%2Fuploads%2FVE7VQTpZBzjZ0ySgcYTt%2FAdd%20Component%20Icon.svg?alt=media&#x26;token=45dd429a-0844-4f56-a4a7-c85811560d2f" alt="" data-size="line">  in the side bar.&#x20;

<figure><img src="https://911720298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkLBGzn2hXrIMe50klQCv%2Fuploads%2F2bpA0Ms9moFCs80iPkyy%2FComponent%20Library.svg?alt=media&#x26;token=d827b760-560a-4bdf-8f10-ebb934e85f81" alt=""><figcaption><p>An example view of the Component Library (v1.19), displaying the default Grid View, expanded drawers and components in the drawers.</p></figcaption></figure>

To add a component to your app select it in the component library and then click on the canvas in the desired location.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkLBGzn2hXrIMe50klQCv%2Fuploads%2FoFLm0hFrBIuT87ZCiKRs%2Fadd_component.mp4?alt=media&token=d9449e00-c8e5-4827-a63c-cbccbd74156a>" %}

{% hint style="info" %}
Other methods for adding components to the canvas include double clicking (which will drop it in a default location) or drag and drop from the library to the canvas
{% endhint %}

The components are grouped into categories librayr&#x20;

Select the desired component and move the cursor over the canvas area.&#x20;

### Grouping Components

Components can be grouped on the canvas. When grouped, these components can be moved together on the canvas, as a single layer in the Component Tree.

{% hint style="info" %}
v1.19 Introduced changes to Grouping and its functionality in the product. For more information, check out [this article](https://learn.squirrel365.io/the-designer/changes-to-grouping-in-v1.19).
{% endhint %}

Components can be grouped in a few ways:

#### 1. Ctrl + G

<figure><img src="https://911720298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkLBGzn2hXrIMe50klQCv%2Fuploads%2FLLkL47dzBQzqKMzvrSgu%2FCtrlG_Grouping.gif?alt=media&#x26;token=849e7498-8123-4320-bd92-a46dfcf40db2" alt=""><figcaption></figcaption></figure>

#### 2. Right-click menu

<figure><img src="https://911720298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkLBGzn2hXrIMe50klQCv%2Fuploads%2FswOEBnRM4InGLgGkyUyS%2FRightClick_Grouping.gif?alt=media&#x26;token=9dd2c493-7433-47ba-a2f9-70297f0a742e" alt=""><figcaption></figcaption></figure>

#### 3. Arrange Menu

<figure><img src="https://911720298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkLBGzn2hXrIMe50klQCv%2Fuploads%2F1nEMvg0Eq9N3Rc3xsfb3%2FArrange_Grouping.gif?alt=media&#x26;token=6d6cb025-7c29-439a-9836-c6e5f75e727d" alt=""><figcaption></figcaption></figure>

### Arranging Components

Components can be arranged on the canvas based on their positions and size. When multiple components are selected, the arrange menu will be enabled.

<figure><img src="https://911720298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkLBGzn2hXrIMe50klQCv%2Fuploads%2FroHT1PofnaQ8uNHclBzc%2FArrange%20Library.svg?alt=media&#x26;token=01511fe6-f54c-4c5f-989f-9dc2f51e2115" alt=""><figcaption><p>From left to right: Align Left, Alight Center, Align Right, Align Top, Align Middle, Align Bottom, Distribute Horizontally, Distribute Vertically, Make Same Size, Make Same Height, Make Same Width</p></figcaption></figure>

{% hint style="info" %}
When arranging components, the arrangement will be based on the first selected component.&#x20;

This is identifiable by the thicker blue bounding box around the component.
{% endhint %}

<figure><img src="https://911720298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkLBGzn2hXrIMe50klQCv%2Fuploads%2FRCCg1yTlaW3heJ07EY3g%2Fimage.png?alt=media&#x26;token=c780d509-9c7e-4a7f-829e-0c613737316d" alt=""><figcaption></figcaption></figure>
