---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.3
alternate:
  - https://divkit.tech/docs/en/concepts/location.md
  - https://divkit.tech/docs/ru/concepts/location.md
---
> **Documentation Index:** Fetch the complete configuration index at https://divkit.tech/docs/en/llms.txt

# Element groups

## Container {#container}

The most basic element that is responsible for the position of child elements is [container](https://divkit.tech/docs/en/concepts/divs/2/div-container.md). The elements in it are shown in the order they are specified.

In the `orientation` parameter, the following types of element orientations are specified:

- `vertical`: For vertical orientation.

    {% cut "View an interactive example" %}

    <iframe src="https://yastatic.net/s3/home/divkit/docs/1.0.8/index.html?url=https://yastatic.net/s3/home/divkit/doc_samples/common/location_1.json" width="700" height="500" frameborder="1"></iframe>

    {% endcut %}

- `horizontal`: For horizontal orientation.

    {% cut "View an interactive example" %}

    <iframe src="https://yastatic.net/s3/home/divkit/docs/1.0.8/index.html?url=https://yastatic.net/s3/home/divkit/doc_samples/common/location_2.json" width="700" height="500" frameborder="1"></iframe>

    {% endcut %}

- `overlap`: With overlap.

    {% cut "View an interactive example" %}

    <iframe src="https://yastatic.net/s3/home/divkit/docs/1.0.8/index.html?url=https://yastatic.net/s3/home/divkit/doc_samples/en/location_3_en.json" width="700" height="500" frameborder="1"></iframe>

    {% endcut %}

    In order for the element to occupy all the free space, its [width](https://divkit.tech/docs/en/concepts/layout.md) must be `match_parent`. If there are several such elements, they will divide the space equally or distribute it according to the value of the `weight` parameter if specified.

    The smaller the number of the element in the `items` array at `orientation:"overlap"`, the lower its position. The zero element of the container will be at the very bottom.

With the `layout_mode` parameter, you can control how elements are arranged. The `wrap` value indicates that the element wraps to the next line if it doesn't fit on the previous one. By default, `layout_mode` is set to `no_wrap`.

{% cut "View an interactive example" %}


<iframe src="https://yastatic.net/s3/home/divkit/docs/1.0.8/index.html?url=https://yastatic.net/s3/home/divkit/doc_samples/common/location_4.json" width="700" height="500" frameborder="1"></iframe>


{% endcut %}

## Grid {#grid}

The [grid](https://divkit.tech/docs/en/concepts/divs/2/div-grid.md) element is used for the complex structure of the table layout. You can use it to position elements in multiple columns and rows.

![](../_images/bridges.png =300x)

You can merge cells in a row or a column:

- `row_span`: Parameter for merging rows.
- `column_span`: Parameter for merging columns.

![](../_images/create-card/grid-2.png =300x)

{% cut "View an interactive example" %}


<iframe src="https://yastatic.net/s3/home/divkit/docs/1.0.8/index.html?url=https://yastatic.net/s3/home/divkit/doc_samples/common/location_5.json" width="700" height="500" frameborder="1"></iframe>


{% endcut %}


The element weight (`weight`) determines how much space an element occupies inside the grid. It can be applied to both the width and height.

![](../_images/create-card/grid-1.png =300x)

{% cut "View an interactive example" %}


<iframe src="https://yastatic.net/s3/home/divkit/docs/1.0.8/index.html?url=https://yastatic.net/s3/home/divkit/doc_samples/common/location_6.json" width="700" height="500" frameborder="1"></iframe>


{% endcut %}



## Pager {#pager}

The [pager](https://divkit.tech/docs/en/concepts/divs/2/div-pager.md) element displays a horizontal set of cards, where the main card is fully visible, and the neighboring ones are partially shown.

![](../_images/create-card/pager.png =300x)

{% cut "View an interactive example" %}


<iframe src="https://yastatic.net/s3/home/divkit/docs/1.0.8/index.html?url=https://yastatic.net/s3/home/divkit/doc_samples/common/location_7.json" width="700" height="500" frameborder="1"></iframe>

{% endcut %}

You can adjust the width of the main card in the `layout_mode` field:

- [fixed](https://divkit.tech/docs/en/concepts/divs/2/div-neighbour-page-size.md): A fixed part of the adjacent cards is shown, and the remaining space is taken up by the main card.
- [percentage](https://divkit.tech/docs/en/concepts/divs/2/div-page-size.md): The width of the main card is indicated as a percentage of the width of the pager.

You can use the pager along with an [indicator](https://divkit.tech/docs/en/concepts/divs/2/div-indicator.md) to display which card has been selected. The indicator can be positioned independently of the pager. The appearance of the indicator can be changed: you can adjust the distances between indicators, their shapes, colors, sizes, and switching animations.

![](../_images/create-card/pager-example.png =300x)

{% cut "View an interactive example" %}

<iframe src="https://yastatic.net/s3/home/divkit/docs/1.0.8/index.html?url=https://yastatic.net/s3/home/divkit/doc_samples/common/location_8.json" width="700" height="500" frameborder="1"></iframe>

{% endcut %}

## Gallery {#gallery}

Pictures inside the [gallery](https://divkit.tech/docs/en/concepts/divs/2/div-gallery.md) element can be any size or content. They don't have to be the same type. The `item_spacing` parameter defines spacing between gallery elements except for the first and last margins: they can be managed using `paddings`.

The gallery height is set according to the height of the largest element.

![](../_images/create-card/gallery.png =300x)

{% cut "View an interactive example" %}

<iframe src="https://yastatic.net/s3/home/divkit/docs/1.0.8/index.html?url=https://yastatic.net/s3/home/divkit/doc_samples/common/location_9.json" width="700" height="500" frameborder="1"></iframe>

{% endcut %}

## Tabs {#tabs}

The [tabs](https://divkit.tech/docs/en/concepts/divs/2/div-tabs.md) element is different from the gallery because it has a header row. Only one page is visible at a time. You can switch to others by swiping.

The height of tabs is different on different platforms:

- On Android, the first tab is the original height. The height of the remaining tabs (from the second to the last) is the same and is equal to their maximum value.
- On iOS, all tabs are the original height.

![](../_images/create-card/tabs.png =300x)

{% cut "View an interactive example" %}

<iframe src="https://yastatic.net/s3/home/divkit/docs/1.0.8/index.html?url=https://yastatic.net/s3/home/divkit/doc_samples/common/location_10.json" width="700" height="500" frameborder="1"></iframe>

{% endcut %}

## Separator {#separator}

The [separator](https://divkit.tech/docs/en/concepts/divs/2/div-separator.md) element is used to divide space between elements.

The separator style is determined by the `delimiter_style` object:

```json
{
  "type": "separator",
  "delimiter_style": {
    "color": "#000000",
    "orientation": "vertical"
  }
}
```

- `orientation`: Separator orientation. It can be either `vertical` or `horizontal`.
- `color`: Separator line color. To hide it, specify the transparent color `#00000000`.

The height of the separator line is independent form the height of the element itself and always equals 1&nbsp;dp. Specifying a larger separator size will cause the separator to appear in the middle.

{% cut "View an interactive example" %}

<iframe src="https://yastatic.net/s3/home/divkit/docs/1.0.8/index.html?url=https://yastatic.net/s3/home/divkit/doc_samples/common/location_11.json" width="700" height="500" frameborder="1"></iframe>

{% endcut %}

## Controlling tabs, pager, and gallery {#control}

To control these elements, use actions with [element switching](https://divkit.tech/docs/en/concepts/interaction.md#switch-elements).

<!-- source: en/_includes/index/troubleshooting.md -->
## Learn more {#troubleshooting}

You can discuss topics of interest in the DivKit user community in Telegram: [https://t.me/divkit_community_en](https://t.me/divkit_community_en).



[DivKit Repository](https://github.com/divkit/divkit)
<!-- endsource: en/_includes/index/troubleshooting.md -->
