div-wrap-content-size

The size of an element adjusts to its contents.

Parameters

Parameters Description
type

string

Required parameter.

The value must always be wrap_content.

constrained

bool_int

The final size mustn't exceed the parent one. On iOS and in a default browser false. On Android always true.

max_size

object

Maximum size of an element.

The value has the type constraint_size.

min_size

object

Minimum size of an element.

The value has the type constraint_size.

constraint_size

Parameters Description
value

int

Required parameter.

Restriction for the value x: x >= 0.

unit

string

Unit of measurement:

  • px — a physical pixel.
  • dp — a logical pixel that doesn't depend on screen density.
  • sp — a logical pixel that depends on the font size on a device. Specify height in sp. Only available on Android.
  • Possible values: dp, sp, px.

    Default value: dp.

    JSON
    {
      type*: "wrap_content",
      constrained: "bool_int",
      max_size: {
        unit: "string",
        value*: "int"
      },
      min_size: {
        unit: "string",
        value*: "int"
      }
    }