# ConstrainScope

Artifact: [androidx.constraintlayout:constraintlayout-compose](https://developer.android.com/jetpack/androidx/releases/constraintlayout) [View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/compose/ConstrainScope.kt+class:androidx.constraintlayout.compose.ConstrainScope) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)


```
@LayoutScopeMarker
class ConstrainScope
```

<br />

*** ** * ** ***

Scope that can be used to constrain a layout.

Used within `Modifier.constrainAs` from the inline DSL API. And within `constrain` from the ConstraintSet-based API.

## Summary

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Dimension` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp.https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#(androidx.compose.ui.unit.Dp).asDimension()()` Convenience extension method to parse a `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` as a `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Dimension` object. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerAround(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.HorizontalAnchor)(anchor: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.HorizontalAnchor)` Adds top and bottom links towards a horizontal `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerAround(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.HorizontalAnchor)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerAround(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor)(anchor: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.VerticalAnchor)` Adds start and end links towards a vertical `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerAround(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerHorizontallyTo(androidx.constraintlayout.compose.ConstrainedLayoutReference,kotlin.Float)( other: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainedLayoutReference, bias: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Adds start and end links towards the corresponding anchors of `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerHorizontallyTo(androidx.constraintlayout.compose.ConstrainedLayoutReference,kotlin.Float)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerTo(androidx.constraintlayout.compose.ConstrainedLayoutReference)(other: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainedLayoutReference)` Adds all start, top, end, bottom links towards the corresponding anchors of `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerTo(androidx.constraintlayout.compose.ConstrainedLayoutReference)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerVerticallyTo(androidx.constraintlayout.compose.ConstrainedLayoutReference,kotlin.Float)( other: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainedLayoutReference, bias: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Adds top and bottom links towards the corresponding anchors of `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerVerticallyTo(androidx.constraintlayout.compose.ConstrainedLayoutReference,kotlin.Float)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#circular(androidx.constraintlayout.compose.ConstrainedLayoutReference,kotlin.Float,androidx.compose.ui.unit.Dp)(other: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainedLayoutReference, angle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, distance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp)` Set a circular constraint relative to the center of `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#circular(androidx.constraintlayout.compose.ConstrainedLayoutReference,kotlin.Float,androidx.compose.ui.unit.Dp)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#clearConstraints()()` Clear all constraints (vertical, horizontal, circular). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#clearHorizontal()()` Clear the constraints on the horizontal axis (left, right, start, end). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#clearVertical()()` Clear the constraints on the vertical axis (top, bottom, baseline). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float)( start: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.VerticalAnchor, end: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.VerticalAnchor, startMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, endMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, startGoneMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, endGoneMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, bias: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Adds both start and end links towards other `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.VerticalAnchor`s. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.HorizontalAnchor,androidx.constraintlayout.compose.ConstraintLayoutBaseScope.HorizontalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float)( top: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.HorizontalAnchor, bottom: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.HorizontalAnchor, topMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, bottomMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, topGoneMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, bottomGoneMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, bias: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Adds both top and bottom links towards other `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.HorizontalAnchor`s. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.constraintlayout.compose.ConstraintLayoutBaseScope.HorizontalAnchor,androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.constraintlayout.compose.ConstraintLayoutBaseScope.HorizontalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Float)( start: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.VerticalAnchor, top: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.HorizontalAnchor, end: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.VerticalAnchor, bottom: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.HorizontalAnchor, startMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, topMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, endMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, bottomMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, startGoneMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, topGoneMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, endGoneMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, bottomGoneMargin: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, horizontalBias: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, verticalBias: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Adds all start, top, end, bottom links towards other `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.HorizontalAnchor`s. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#resetDimensions()()` Resets the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#width()` and `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#height()` to their default values. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#resetTransforms()()` Reset all render-time transforms of the content to their default values. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/VerticalAnchorable` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#absoluteLeft()` The left anchor of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/VerticalAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/VerticalAnchorable` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#absoluteRight()` The right anchor of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/VerticalAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#alpha()` The transparency value when rendering the content. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/BaselineAnchorable` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#baseline()` The `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#FirstBaseline()` of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/BaselineAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.BaselineAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/HorizontalAnchorable` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#bottom()` The bottom anchor of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/HorizontalAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.HorizontalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/VerticalAnchorable` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#end()` The end anchor of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/VerticalAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Dimension` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#height()` The height of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayout.composable#ConstraintLayout(androidx.compose.ui.Modifier,kotlin.Int,androidx.compose.animation.core.AnimationSpec,kotlin.Function0,kotlin.Function1)` child. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#horizontalBias()` Applied when the widget has constraints on the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#start()` and `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#end()` anchors. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#horizontalChainWeight()` Whenever the width is not fixed, this weight may be used by an horizontal Chain to decide how much space assign to this widget. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainedLayoutReference` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#parent()` Reference to the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayout.composable#ConstraintLayout(androidx.compose.ui.Modifier,kotlin.Int,androidx.compose.animation.core.AnimationSpec,kotlin.Function0,kotlin.Function1)` itself, which can be used to specify constraints between itself and its children. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#pivotX()` The X axis offset percent where the content is rotated and scaled. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#pivotY()` The Y axis offset percent where the content is rotated and scaled. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#rotationX()` The degrees to rotate the content over the horizontal axis. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#rotationY()` The degrees to rotate the content over the vertical axis. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#rotationZ()` The degrees to rotate the content on the screen plane. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#scaleX()` The percent scaling value on the horizontal axis. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#scaleY()` The percent scaling value on the vertical axis. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/VerticalAnchorable` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#start()` The start anchor of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/VerticalAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/HorizontalAnchorable` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#top()` The top anchor of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/HorizontalAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.HorizontalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#translationX()` The distance to offset the content over the X axis. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#translationY()` The distance to offset the content over the Y axis. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#translationZ()` The distance to offset the content over the Z axis. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#verticalBias()` Applied when the widget has constraints on the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#top()` and `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#bottom()` anchors. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#verticalChainWeight()` Whenever the height is not fixed, this weight may be used by a vertical Chain to decide how much space assign to this widget. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Visibility` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#visibility()` The overall visibility of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayout.composable#ConstraintLayout(androidx.compose.ui.Modifier,kotlin.Int,androidx.compose.animation.core.AnimationSpec,kotlin.Function0,kotlin.Function1)` child. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Dimension` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#width()` The width of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayout.composable#ConstraintLayout(androidx.compose.ui.Modifier,kotlin.Int,androidx.compose.animation.core.AnimationSpec,kotlin.Function0,kotlin.Function1)` child. |

## Public functions

### Dp.asDimension

Artifact: [androidx.constraintlayout:constraintlayout-compose](https://developer.android.com/jetpack/androidx/releases/constraintlayout) [View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/compose/ConstrainScope.kt+function:asDimension)

```
fun Dp.asDimension(): Dimension
```

Convenience extension method to parse a `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` as a `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Dimension` object.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Dimension#value(androidx.compose.ui.unit.Dp)` |   |

### centerAround

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun centerAround(anchor: ConstraintLayoutBaseScope.HorizontalAnchor): Unit
```

Adds top and bottom links towards a horizontal `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerAround(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.HorizontalAnchor)`. This will center the current layout around the horizontal `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerAround(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.HorizontalAnchor)`.

### centerAround

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun centerAround(anchor: ConstraintLayoutBaseScope.VerticalAnchor): Unit
```

Adds start and end links towards a vertical `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerAround(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor)`. This will center the current layout around the vertical `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerAround(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor)`.

### centerHorizontallyTo

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun centerHorizontallyTo(
    other: ConstrainedLayoutReference,
    bias: @FloatRange(from = 0.0, to = 1.0) Float = 0.5f
): Unit
```

Adds start and end links towards the corresponding anchors of `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerHorizontallyTo(androidx.constraintlayout.compose.ConstrainedLayoutReference,kotlin.Float)`. This will center horizontally the current layout inside or around (depending on size) `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerHorizontallyTo(androidx.constraintlayout.compose.ConstrainedLayoutReference,kotlin.Float)`.

### centerTo

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun centerTo(other: ConstrainedLayoutReference): Unit
```

Adds all start, top, end, bottom links towards the corresponding anchors of `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerTo(androidx.constraintlayout.compose.ConstrainedLayoutReference)`. This will center the current layout inside or around (depending on size) `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerTo(androidx.constraintlayout.compose.ConstrainedLayoutReference)`.

### centerVerticallyTo

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun centerVerticallyTo(
    other: ConstrainedLayoutReference,
    bias: @FloatRange(from = 0.0, to = 1.0) Float = 0.5f
): Unit
```

Adds top and bottom links towards the corresponding anchors of `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerVerticallyTo(androidx.constraintlayout.compose.ConstrainedLayoutReference,kotlin.Float)`. This will center vertically the current layout inside or around (depending on size) `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#centerVerticallyTo(androidx.constraintlayout.compose.ConstrainedLayoutReference,kotlin.Float)`.

### circular

```
fun circular(other: ConstrainedLayoutReference, angle: Float, distance: Dp): Unit
```

Set a circular constraint relative to the center of `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#circular(androidx.constraintlayout.compose.ConstrainedLayoutReference,kotlin.Float,androidx.compose.ui.unit.Dp)`. This will position the current widget at a relative angle and distance from `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#circular(androidx.constraintlayout.compose.ConstrainedLayoutReference,kotlin.Float,androidx.compose.ui.unit.Dp)`.

### clearConstraints

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun clearConstraints(): Unit
```

Clear all constraints (vertical, horizontal, circular).

Useful when extending another `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet` with unwanted constraints applied.

### clearHorizontal

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun clearHorizontal(): Unit
```

Clear the constraints on the horizontal axis (left, right, start, end).

Useful when extending another `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet` with unwanted constraints on this axis.

### clearVertical

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun clearVertical(): Unit
```

Clear the constraints on the vertical axis (top, bottom, baseline).

Useful when extending another `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet` with unwanted constraints on this axis.

### linkTo

```
fun linkTo(
    start: ConstraintLayoutBaseScope.VerticalAnchor,
    end: ConstraintLayoutBaseScope.VerticalAnchor,
    startMargin: Dp = 0.dp,
    endMargin: Dp = 0.dp,
    startGoneMargin: Dp = 0.dp,
    endGoneMargin: Dp = 0.dp,
    bias: @FloatRange(from = 0.0, to = 1.0) Float = 0.5f
): Unit
```

Adds both start and end links towards other `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.VerticalAnchor`s.

### linkTo

```
fun linkTo(
    top: ConstraintLayoutBaseScope.HorizontalAnchor,
    bottom: ConstraintLayoutBaseScope.HorizontalAnchor,
    topMargin: Dp = 0.dp,
    bottomMargin: Dp = 0.dp,
    topGoneMargin: Dp = 0.dp,
    bottomGoneMargin: Dp = 0.dp,
    bias: @FloatRange(from = 0.0, to = 1.0) Float = 0.5f
): Unit
```

Adds both top and bottom links towards other `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.HorizontalAnchor`s.

### linkTo

```
fun linkTo(
    start: ConstraintLayoutBaseScope.VerticalAnchor,
    top: ConstraintLayoutBaseScope.HorizontalAnchor,
    end: ConstraintLayoutBaseScope.VerticalAnchor,
    bottom: ConstraintLayoutBaseScope.HorizontalAnchor,
    startMargin: Dp = 0.dp,
    topMargin: Dp = 0.dp,
    endMargin: Dp = 0.dp,
    bottomMargin: Dp = 0.dp,
    startGoneMargin: Dp = 0.dp,
    topGoneMargin: Dp = 0.dp,
    endGoneMargin: Dp = 0.dp,
    bottomGoneMargin: Dp = 0.dp,
    horizontalBias: @FloatRange(from = 0.0, to = 1.0) Float = 0.5f,
    verticalBias: @FloatRange(from = 0.0, to = 1.0) Float = 0.5f
): Unit
```

Adds all start, top, end, bottom links towards other `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayoutBaseScope.HorizontalAnchor`s.

### resetDimensions

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun resetDimensions(): Unit
```

Resets the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#width()` and `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#height()` to their default values.

Useful when extending another `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet` with unwanted dimensions.

### resetTransforms

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun resetTransforms(): Unit
```

Reset all render-time transforms of the content to their default values.

Does not modify the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#visibility()` property.

Useful when extending another `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet` with unwanted transforms applied.

## Public properties

### absoluteLeft

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
val absoluteLeft: VerticalAnchorable
```

The left anchor of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/VerticalAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

### absoluteRight

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
val absoluteRight: VerticalAnchorable
```

The right anchor of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/VerticalAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

### alpha

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var alpha: @FloatRange(from = 0.0, to = 1.0) Float
```

The transparency value when rendering the content.

### baseline

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
val baseline: BaselineAnchorable
```

The `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#FirstBaseline()` of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/BaselineAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.BaselineAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

### bottom

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
val bottom: HorizontalAnchorable
```

The bottom anchor of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/HorizontalAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.HorizontalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

### end

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
val end: VerticalAnchorable
```

The end anchor of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/VerticalAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

### height

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var height: Dimension
```

The height of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayout.composable#ConstraintLayout(androidx.compose.ui.Modifier,kotlin.Int,androidx.compose.animation.core.AnimationSpec,kotlin.Function0,kotlin.Function1)` child.

### horizontalBias

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var horizontalBias: @FloatRange(from = 0.0, to = 1.0) Float
```

Applied when the widget has constraints on the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#start()` and `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#end()` anchors. It defines the position of the widget relative to the space within the constraints, where `0f` is the left-most position and `1f` is the right-most position.

When layout direction is RTL, the value of the bias is effectively inverted.

E.g.: For `horizontalBias = 0.3f`, `0.7f` is used for RTL.

Note that the bias may also be applied with calls such as `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float)`.

### horizontalChainWeight

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var horizontalChainWeight: Float
```

Whenever the width is not fixed, this weight may be used by an horizontal Chain to decide how much space assign to this widget.

### parent

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
val parent: ConstrainedLayoutReference
```

Reference to the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayout.composable#ConstraintLayout(androidx.compose.ui.Modifier,kotlin.Int,androidx.compose.animation.core.AnimationSpec,kotlin.Function0,kotlin.Function1)` itself, which can be used to specify constraints between itself and its children.

### pivotX

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var pivotX: Float
```

The X axis offset percent where the content is rotated and scaled.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/TransformOrigin` |   |

### pivotY

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var pivotY: Float
```

The Y axis offset percent where the content is rotated and scaled.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/TransformOrigin` |   |

### rotationX

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var rotationX: Float
```

The degrees to rotate the content over the horizontal axis.

### rotationY

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var rotationY: Float
```

The degrees to rotate the content over the vertical axis.

### rotationZ

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var rotationZ: Float
```

The degrees to rotate the content on the screen plane.

### scaleX

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var scaleX: Float
```

The percent scaling value on the horizontal axis. Where 1 is 100%.

### scaleY

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var scaleY: Float
```

The percent scaling value on the vertical axis. Where 1 is 100%.

### start

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
val start: VerticalAnchorable
```

The start anchor of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/VerticalAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.VerticalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

### top

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
val top: HorizontalAnchorable
```

The top anchor of the layout - can be constrained using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/HorizontalAnchorable#linkTo(androidx.constraintlayout.compose.ConstraintLayoutBaseScope.HorizontalAnchor,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

### translationX

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var translationX: Dp
```

The distance to offset the content over the X axis.

### translationY

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var translationY: Dp
```

The distance to offset the content over the Y axis.

### translationZ

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var translationZ: Dp
```

The distance to offset the content over the Z axis.

### verticalBias

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var verticalBias: @FloatRange(from = 0.0, to = 1.0) Float
```

Applied when the widget has constraints on the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#top()` and `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope#bottom()` anchors. It defines the position of the widget relative to the space within the constraints, where `0f` is the top-most position and `1f` is the bottom-most position.

### verticalChainWeight

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var verticalChainWeight: Float
```

Whenever the height is not fixed, this weight may be used by a vertical Chain to decide how much space assign to this widget.

### visibility

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var visibility: Visibility
```

The overall visibility of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayout.composable#ConstraintLayout(androidx.compose.ui.Modifier,kotlin.Int,androidx.compose.animation.core.AnimationSpec,kotlin.Function0,kotlin.Function1)` child.

`https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Visibility#Visible()` by default.

### width

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var width: Dimension
```

The width of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintLayout.composable#ConstraintLayout(androidx.compose.ui.Modifier,kotlin.Int,androidx.compose.animation.core.AnimationSpec,kotlin.Function0,kotlin.Function1)` child.