Stay organized with collections
Save and categorize content based on your preferences.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-15 UTC.
[null,null,["Last updated 2025-05-15 UTC."],[],[],null,["# MotionLayoutScope.MotionProperties\n==================================\n\nArtifact: [androidx.constraintlayout:constraintlayout-compose](/jetpack/androidx/releases/constraintlayout) \n[View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/compose/MotionLayout.kt+class:androidx.constraintlayout.compose.MotionLayoutScope.MotionProperties) \nAdded in [1.1.1](/jetpack/androidx/releases/constraintlayout#1.1.1)\n\n\n```\ninner class MotionLayoutScope.MotionProperties\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nSummary\n-------\n\n| ### Public functions |\n|--------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Color](/reference/kotlin/androidx/compose/ui/graphics/Color) | [color](/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.MotionProperties#color(kotlin.String))`(name: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` |\n| [Dp](/reference/kotlin/androidx/compose/ui/unit/Dp) | [distance](/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.MotionProperties#distance(kotlin.String))`(name: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` |\n| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [float](/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.MotionProperties#float(kotlin.String))`(name: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` |\n| [TextUnit](/reference/kotlin/androidx/compose/ui/unit/TextUnit) | [fontSize](/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.MotionProperties#fontSize(kotlin.String))`(name: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` |\n| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [id](/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.MotionProperties#id())`()` |\n| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [int](/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.MotionProperties#int(kotlin.String))`(name: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` |\n| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`?` | [tag](/reference/kotlin/androidx/constraintlayout/compose/MotionLayoutScope.MotionProperties#tag())`()` |\n\nPublic functions\n----------------\n\n### color\n\nAdded in [1.1.1](/jetpack/androidx/releases/constraintlayout#1.1.1) \n\n```\nfun color(name: String): Color\n``` \n\n### distance\n\nAdded in [1.1.1](/jetpack/androidx/releases/constraintlayout#1.1.1) \n\n```\nfun distance(name: String): Dp\n``` \n\n### float\n\nAdded in [1.1.1](/jetpack/androidx/releases/constraintlayout#1.1.1) \n\n```\nfun float(name: String): Float\n``` \n\n### fontSize\n\nAdded in [1.1.1](/jetpack/androidx/releases/constraintlayout#1.1.1) \n\n```\nfun fontSize(name: String): TextUnit\n``` \n\n### id\n\nAdded in [1.1.1](/jetpack/androidx/releases/constraintlayout#1.1.1) \n\n```\nfun id(): String\n``` \n\n### int\n\nAdded in [1.1.1](/jetpack/androidx/releases/constraintlayout#1.1.1) \n\n```\nfun int(name: String): Int\n``` \n\n### tag\n\nAdded in [1.1.1](/jetpack/androidx/releases/constraintlayout#1.1.1) \n\n```\nfun tag(): String?\n```"]]