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

# div-wrap-content-size
The size of an element adjusts to its contents.

## Parameters
| Parameters | Description |
| --- | --- |
| `type` | <p>**string**</p><p>Required parameter.</p><p>The value must always be `wrap_content`.</p> |
| `constrained` | <p>**bool_int**</p><p>The final size mustn't exceed the parent one. On iOS and in a default browser `false`. On Android always `true`.</p> |
| `max_size` | <p>**object**</p><p>Maximum size of an element.</p><p>The value has the type `div-size-unit-value`.</p> |
| `min_size` | <p>**object**</p><p>Minimum size of an element.</p><p>The value has the type `div-size-unit-value`.</p> |

<details>
<summary>JSON</summary>

```json
{
  type*: "wrap_content",
  constrained: "bool_int",
  max_size: {
    unit: "string",
    value*: "int"
  },
  min_size: {
    unit: "string",
    value*: "int"
  }
}
```
</details>
