# MotionSceneScope

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/MotionSceneScope.kt+class:androidx.constraintlayout.compose.MotionSceneScope) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)


```
@ExperimentalMotionApi
class MotionSceneScope
```

<br />

*** ** * ** ***

Scope used by the MotionScene DSL.

Define new `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet`s and `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Transition`s within this scope using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#constraintSet(kotlin.String,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.Function1)` and `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#transition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.String,kotlin.Function1)` respectively.

Alternatively, you may add existing objects to this scope using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#addConstraintSet(androidx.constraintlayout.compose.ConstraintSet,kotlin.String)` and `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#addTransition(androidx.constraintlayout.compose.Transition,kotlin.String)`.

The `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#defaultTransition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.Function1)` **should always be set** . It defines the initial state of the layout and works as a fallback for undefined `from -> to` transitions.

## Summary

| ### Nested types |
|---|
| `inner class https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope.ConstrainedLayoutReferences` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSetRef` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#addConstraintSet(androidx.constraintlayout.compose.ConstraintSet,kotlin.String)(constraintSet: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet, name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Adds an existing `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet` object to the scope of this MotionScene. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#addTransition(androidx.constraintlayout.compose.Transition,kotlin.String)(transition: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Transition, name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Adds an existing `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Transition` object to the scope of this MotionScene. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSetRef` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#constraintSet(kotlin.String,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.Function1)( name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, extendConstraintSet: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSetRef?, constraintSetContent: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSetScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Creates a `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet` that extends the changes applied by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#constraintSet(kotlin.String,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.Function1)` (if not null). |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainedLayoutReference` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#createRefFor(kotlin.Any)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)` Creates one `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainedLayoutReference` corresponding 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)` element with `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#createRefFor(kotlin.Any)`. |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope.ConstrainedLayoutReferences` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#createRefsFor(kotlin.Array)(vararg ids: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)` Convenient way to create multiple `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainedLayoutReference` with one statement, the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#createRefsFor(kotlin.Array)` provided should match Composables within ConstraintLayout using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/layoutId.modifier#(androidx.compose.ui.Modifier).layoutId(kotlin.String,kotlin.String)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope.https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customColor(kotlin.String,androidx.compose.ui.graphics.Color)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, value: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)` Declare a custom Color `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customColor(kotlin.String,androidx.compose.ui.graphics.Color)` addressed by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customColor(kotlin.String,androidx.compose.ui.graphics.Color)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope.https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customColor(kotlin.String,androidx.compose.ui.graphics.Color)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, value: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)` Sets the custom Color `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customColor(kotlin.String,androidx.compose.ui.graphics.Color)` at the frame of the current `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope.https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customDistance(kotlin.String,androidx.compose.ui.unit.Dp)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, value: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp)` Declare a custom Dp `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customDistance(kotlin.String,androidx.compose.ui.unit.Dp)` addressed by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customDistance(kotlin.String,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/KeyAttributeScope.https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customDistance(kotlin.String,androidx.compose.ui.unit.Dp)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, value: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp)` Sets the custom Dp `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customDistance(kotlin.String,androidx.compose.ui.unit.Dp)` at the frame of the current `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope.https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customFloat(kotlin.String,kotlin.Float)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Declare a custom Float `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customFloat(kotlin.String,kotlin.Float)` addressed by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customFloat(kotlin.String,kotlin.Float)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope.https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customFloat(kotlin.String,kotlin.Float)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Sets the custom Float `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customFloat(kotlin.String,kotlin.Float)` at the frame of the current `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope.https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customFontSize(kotlin.String,androidx.compose.ui.unit.TextUnit)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, value: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit)` Declare a custom TextUnit `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customFontSize(kotlin.String,androidx.compose.ui.unit.TextUnit)` addressed by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customFontSize(kotlin.String,androidx.compose.ui.unit.TextUnit)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope.https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customFontSize(kotlin.String,androidx.compose.ui.unit.TextUnit)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, value: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit)` Sets the custom TextUnit `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customFontSize(kotlin.String,androidx.compose.ui.unit.TextUnit)` at the frame of the current `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope.https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customInt(kotlin.String,kotlin.Int)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Declare a custom Int `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customInt(kotlin.String,kotlin.Int)` addressed by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customInt(kotlin.String,kotlin.Int)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope.https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customInt(kotlin.String,kotlin.Int)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the custom Int `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customInt(kotlin.String,kotlin.Int)` at the frame of the current `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#defaultTransition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.Function1)( from: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSetRef, to: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSetRef, transitionContent: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/TransitionScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Defines the default `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Transition`, where the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#defaultTransition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.Function1)` and `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet`s will be the initial start and end states of the layout. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#transition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.String,kotlin.Function1)( from: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSetRef, to: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSetRef, name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, transitionContent: https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/TransitionScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Adds a `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Transition` defined by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#transition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.String,kotlin.Function1)`. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainScope.https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).staggeredWeight()` Custom staggered weight. |

## Public functions

### addConstraintSet

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

```
fun addConstraintSet(constraintSet: ConstraintSet, name: String? = null): ConstraintSetRef
```

Adds an existing `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet` object to the scope of this MotionScene. A `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#addConstraintSet(androidx.constraintlayout.compose.ConstraintSet,kotlin.String)` may be provided and it can be used on MotionLayout calls that request a ConstraintSet name.

Returns a `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSetRef` object representing the added `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#addConstraintSet(androidx.constraintlayout.compose.ConstraintSet,kotlin.String)`, which may be used as a parameter of `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#transition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.String,kotlin.Function1)`.

### addTransition

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

```
fun addTransition(transition: Transition, name: String? = null): Unit
```

Adds an existing `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Transition` object to the scope of this MotionScene. A `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#addTransition(androidx.constraintlayout.compose.Transition,kotlin.String)` may be provided and it can be used on MotionLayout calls that request a Transition name.

The `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet`s referenced by the transition must match the name of a `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet` added within this scope.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#constraintSet(kotlin.String,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.Function1)` |   |
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#addConstraintSet(androidx.constraintlayout.compose.ConstraintSet,kotlin.String)` |   |

### constraintSet

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

```
fun constraintSet(
    name: String? = null,
    extendConstraintSet: ConstraintSetRef? = null,
    constraintSetContent: ConstraintSetScope.() -> Unit
): ConstraintSetRef
```

Creates a `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet` that extends the changes applied by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#constraintSet(kotlin.String,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.Function1)` (if not null).

A `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#constraintSet(kotlin.String,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.Function1)` may be provided and it can be used on MotionLayout calls that request a ConstraintSet name.

Returns a `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSetRef` object representing this ConstraintSet, which may be used as a parameter of `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#transition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.String,kotlin.Function1)`.

### createRefFor

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

```
fun createRefFor(id: Any): ConstrainedLayoutReference
```

Creates one `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainedLayoutReference` corresponding 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)` element with `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#createRefFor(kotlin.Any)`.

### createRefsFor

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

```
fun createRefsFor(vararg ids: Any): MotionSceneScope.ConstrainedLayoutReferences
```

Convenient way to create multiple `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainedLayoutReference` with one statement, the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#createRefsFor(kotlin.Array)` provided should match Composables within ConstraintLayout using `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/layoutId.modifier#(androidx.compose.ui.Modifier).layoutId(kotlin.String,kotlin.String)`.

Example:

```kotlin
val (box, text, button) = createRefsFor("box", "text", "button")
```

Note that the number of ids should match the number of variables assigned.

To create a singular `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstrainedLayoutReference` see `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#createRefFor(kotlin.Any)`.

### ConstrainScope.customColor

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/MotionSceneScope.kt+function:customColor)

```
fun ConstrainScope.customColor(name: String, value: Color): Unit
```

Declare a custom Color `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customColor(kotlin.String,androidx.compose.ui.graphics.Color)` addressed by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customColor(kotlin.String,androidx.compose.ui.graphics.Color)`.

### KeyAttributeScope.customColor

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/MotionSceneScope.kt+function:customColor)

```
fun KeyAttributeScope.customColor(name: String, value: Color): Unit
```

Sets the custom Color `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customColor(kotlin.String,androidx.compose.ui.graphics.Color)` at the frame of the current `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope`.

### ConstrainScope.customDistance

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/MotionSceneScope.kt+function:customDistance)

```
fun ConstrainScope.customDistance(name: String, value: Dp): Unit
```

Declare a custom Dp `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customDistance(kotlin.String,androidx.compose.ui.unit.Dp)` addressed by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customDistance(kotlin.String,androidx.compose.ui.unit.Dp)`.

### KeyAttributeScope.customDistance

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/MotionSceneScope.kt+function:customDistance)

```
fun KeyAttributeScope.customDistance(name: String, value: Dp): Unit
```

Sets the custom Dp `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customDistance(kotlin.String,androidx.compose.ui.unit.Dp)` at the frame of the current `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope`.

### ConstrainScope.customFloat

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/MotionSceneScope.kt+function:customFloat) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun ConstrainScope.customFloat(name: String, value: Float): Unit
```

Declare a custom Float `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customFloat(kotlin.String,kotlin.Float)` addressed by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customFloat(kotlin.String,kotlin.Float)`.

### KeyAttributeScope.customFloat

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/MotionSceneScope.kt+function:customFloat) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun KeyAttributeScope.customFloat(name: String, value: Float): Unit
```

Sets the custom Float `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customFloat(kotlin.String,kotlin.Float)` at the frame of the current `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope`.

### ConstrainScope.customFontSize

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/MotionSceneScope.kt+function:customFontSize)

```
fun ConstrainScope.customFontSize(name: String, value: TextUnit): Unit
```

Declare a custom TextUnit `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customFontSize(kotlin.String,androidx.compose.ui.unit.TextUnit)` addressed by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customFontSize(kotlin.String,androidx.compose.ui.unit.TextUnit)`.

### KeyAttributeScope.customFontSize

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/MotionSceneScope.kt+function:customFontSize)

```
fun KeyAttributeScope.customFontSize(name: String, value: TextUnit): Unit
```

Sets the custom TextUnit `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customFontSize(kotlin.String,androidx.compose.ui.unit.TextUnit)` at the frame of the current `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope`.

### ConstrainScope.customInt

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/MotionSceneScope.kt+function:customInt) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun ConstrainScope.customInt(name: String, value: Int): Unit
```

Declare a custom Int `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customInt(kotlin.String,kotlin.Int)` addressed by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customInt(kotlin.String,kotlin.Int)`.

### KeyAttributeScope.customInt

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/MotionSceneScope.kt+function:customInt) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun KeyAttributeScope.customInt(name: String, value: Int): Unit
```

Sets the custom Int `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.KeyAttributeScope).customInt(kotlin.String,kotlin.Int)` at the frame of the current `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope`.

### defaultTransition

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

```
fun defaultTransition(
    from: ConstraintSetRef,
    to: ConstraintSetRef,
    transitionContent: TransitionScope.() -> Unit = {}
): Unit
```

Defines the default `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Transition`, where the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#defaultTransition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.Function1)` and `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet`s will be the initial start and end states of the layout.

The default `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Transition` will also be applied when the combination of `from` and `to` ConstraintSets was not defined by a `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#transition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.String,kotlin.Function1)` call.

This `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Transition` is required to initialize `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayout.composable#MotionLayout(androidx.constraintlayout.compose.ConstraintSet,androidx.constraintlayout.compose.ConstraintSet,kotlin.Float,androidx.compose.ui.Modifier,androidx.constraintlayout.compose.Transition,androidx.constraintlayout.compose.DebugFlags,kotlin.Int,androidx.constraintlayout.compose.InvalidationStrategy,kotlin.Function1)`.

### transition

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

```
fun transition(
    from: ConstraintSetRef,
    to: ConstraintSetRef,
    name: String? = null,
    transitionContent: TransitionScope.() -> Unit
): Unit
```

Adds a `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/Transition` defined by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#transition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.String,kotlin.Function1)`. A `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#transition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.String,kotlin.Function1)` may be provided and it can be used on MotionLayout calls that request a Transition name.

Where `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#transition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.String,kotlin.Function1)` and `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#transition(androidx.constraintlayout.compose.ConstraintSetRef,androidx.constraintlayout.compose.ConstraintSetRef,kotlin.String,kotlin.Function1)` are the ConstraintSets handled by it.

## Public properties

### ConstrainScope.staggeredWeight

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/MotionSceneScope.kt+symbol:staggeredWeight) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
var ConstrainScope.staggeredWeight: Float
```

Custom staggered weight. When set, MotionLayout will use these values instead of the default way of calculating the weight, ignoring those with a `Float.NaN` value.

The value is `Float.NaN` by default. Note that when all widgets are set to `Float.NaN`, MotionLayout will use the default way of calculating the weight.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/TransitionScope#maxStaggerDelay()` |   |