---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
alternate:
  - https://divkit.tech/docs/en/concepts/divs/2/div-match-parent-size.md
  - https://divkit.tech/docs/ru/concepts/divs/2/div-match-parent-size.md
  - href: en/concepts/divs/2/div-match-parent-size.md
    type: text/markdown
    title: Markdown version
  - href: ../../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://divkit.tech/docs/en/llms.txt

# div-match-parent-size
Element size adjusts to a parent element.

## Parameters
| Parameters | Description |
| --- | --- |
| `type` | <p>**string**</p><p>Required parameter.</p><p>The value must always be `match_parent`.</p> |
| `max_size` | <p>**object**</p><p>Maximum size of an element.</p><p>The value has the type `div-size-unit-value`.</p><p>Available platforms: Android, iOS, web.</p> |
| `min_size` | <p>**object**</p><p>Minimum size of an element.</p><p>The value has the type `div-size-unit-value`.</p><p>Available platforms: Android, iOS, web.</p> |
| `weight` | <p>**number**</p><p>Weight when distributing free space between elements with the size type `match_parent` inside an element. If the weight isn't specified, the elements will divide the place equally.</p><p>Restriction for the value `x`: `x > 0`.</p> |

<details>
<summary>JSON</summary>

```json
{
  type*: "match_parent",
  max_size: {
    unit: "string",
    value*: "int"
  },
  min_size: {
    unit: "string",
    value*: "int"
  },
  weight: "number"
}
```
</details>
