# Container

The **Container** block is the cornerstone of all applications built on our No Code Platform for creating Telegram Mini Apps. It serves as the primary building block for structuring and organizing your app's content. By grouping and aligning other blocks within a Container, you can create complex and responsive layouts that enhance user experience.

## Content

* [Inner blocks alignment](#inner-blocks-alignment)
* [Horizontal alignment and distribution](#horizontal-alignment-and-distribution)
* [Vertical alignment and distribution](#vertical-alignment-and-distribution)
  * [How to align vertical placed blocks by the center?](#how-to-align-vertical-placed-blocks-by-the-center)
* [Fixation on the screen](#fixation-on-the-screen)
* [Navigation (links or pages)](#navigation-links-and-pages)
* [Image cover](#image-cover)
* [Blur](#blur)
* [Full screen sizing](#full-screen-sizing)

## Inner blocks alignment

You can align inner blocks vertically or horizontally:

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

### Horizontal alignment and distribution

When you align blocks horizontally, inner blocks are placed from the left to the right each after each:

<figure><img src="/files/bQCzX9cRHxaxRC8wuAzH" alt=""><figcaption><p>Horizontal alignment of inner blocks of the container</p></figcaption></figure>

<figure><img src="/files/gxUxM20BfPokjEsm0rhy" alt=""><figcaption><p>The structure of the following blocks</p></figcaption></figure>

In this case, you can distribute blocks (to the left, in the center, between the container, etc.):

<figure><img src="/files/SFMD5yfz1v7ATZz4wrMc" alt=""><figcaption><p>Move to center</p></figcaption></figure>

<figure><img src="/files/3Y4YgF6Wn92E6D69njFU" alt=""><figcaption><p>Move to the left</p></figcaption></figure>

<figure><img src="/files/1CLpGLvRzeeGdfH5agPK" alt=""><figcaption><p>Place blocks between the container</p></figcaption></figure>

<figure><img src="/files/QWqFUoIFSJcH9lC1Jm05" alt=""><figcaption><p>Place block around the container</p></figcaption></figure>

Moreover, if inner blocks are different in size, you can move them between top and bottom corner of the container:

<figure><img src="/files/2cUPM9W2mKTUz15QLS3j" alt=""><figcaption><p>Center</p></figcaption></figure>

<figure><img src="/files/UVHnUUhXhWaTCBhdH1WW" alt=""><figcaption><p>Top</p></figcaption></figure>

<figure><img src="/files/WhLHmn6HScvDkRFMY0s4" alt=""><figcaption><p>Bottom</p></figcaption></figure>

### Vertical alignment and distribution

When blocks are aligned vertically, they are placed from the top to the bottom **by the left side**:

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

#### How to align vertical placed blocks by the center?

To align vertically aligned blocks by the center, you need to add inner blocks and place blocks into them with the following structure:

<figure><img src="/files/0lkE2tSBIB3RtX0txeRr" alt=""><figcaption></figcaption></figure>

In this case, blocks will be displayed like here:

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

### Navigation (links and pages)

You can attach any link to the container:

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

Or you can [insert the link to another page to navigate between pages](/tgtaps-docs/features/navigation.md).

### Fixation on the screen

The container can be fixed to the top or bottom side of the screen. This is needed to achieve “floating” effect for toolbar or bottom menu:

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

To make the container floating, select `isFixed`:

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

### Image cover

You can upload an image to the background of your container:

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

Also, you need to select an image placement when the image is too big:

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

Keep in mind that containers do not have the own "size". Therefore, other blocks needs to be placed in the container. In the example we have an empty transparent block in the container:

<figure><img src="/files/2NcE2sPc4JnmqQSLrVMy" alt=""><figcaption></figcaption></figure>

### Blur

Containers can be blurred:

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

Blur is used for floating components to make them more visible under other blocks:

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

### Full screen sizing

You can make the height of the container to fix 100% of the screen:

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

If inner blocks take more space that the screen height, the height of the container will be increased.

***

Something unclear in docs or you know how to improve article? [Message us in community!](https://docs.tgtaps.com/tgtaps-docs/readme/community)\
We will answer you and then promise to improve the article within 3 days.


---

# 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://tgtaps.gitbook.io/tgtaps-docs/blocks/basic/quickstart.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.
