# MotionLayoutScope.CustomProperties

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

<br />

```
inner class MotionLayoutScope.CustomProperties
```

<br />

*** ** * ** ***

## Summary

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#color(kotlin.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Return the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` value of the custom property `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#color(kotlin.String)`, of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#id()` layout. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#distance(kotlin.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Return the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` value of the custom property `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#distance(kotlin.String)`, of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#id()` layout. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#float(kotlin.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Return the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` value of the custom property `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#float(kotlin.String)`, of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#id()` layout. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#fontSize(kotlin.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Return the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` value of the custom property `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#fontSize(kotlin.String)`, of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#id()` layout. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#int(kotlin.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Return the current `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` value of the custom property `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#int(kotlin.String)`, of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#id()` layout. |

## Public functions

### color

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

```
fun color(name: String): Color
```

Return the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` value of the custom property `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#color(kotlin.String)`, of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#id()` layout.

Returns `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()` if the property does not exist.

### distance

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

```
fun distance(name: String): Dp
```

Return the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` value of the custom property `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#distance(kotlin.String)`, of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#id()` layout.

Returns `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp#Unspecified()` if the property does not exist.

### float

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

```
fun float(name: String): Float
```

Return the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` value of the custom property `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#float(kotlin.String)`, of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#id()` layout.

Returns `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()` if the property does not exist.

### fontSize

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

```
fun fontSize(name: String): TextUnit
```

Return the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` value of the custom property `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#fontSize(kotlin.String)`, of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#id()` layout.

Returns `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()` if the property does not exist.

### int

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

```
fun int(name: String): Int
```

Return the current `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` value of the custom property `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#int(kotlin.String)`, of the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.CustomProperties#id()` layout.

Returns `0` if the property does not exist.