# KeyAttributeScope

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


```
@ExperimentalMotionApi
@LayoutScopeMarker
class KeyAttributeScope : BaseKeyFrameScope
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.constraintlayout.compose.BaseKeyFrameScope](https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/BaseKeyFrameScope) ||
|   | ↳ | [androidx.constraintlayout.compose.KeyAttributeScope](https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope) |

*** ** * ** ***

Scope to define KeyFrame attributes.

Supports transform parameters: alpha, scale, rotation and translation.

You may also define custom properties when called within a `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/MotionSceneScope#(androidx.constraintlayout.compose.ConstrainScope).customFloat(kotlin.String,kotlin.Float)` |   |

## Summary

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope#alpha()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope#rotationX()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope#rotationY()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope#rotationZ()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope#scaleX()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope#scaleY()` |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope#translationX()` |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope#translationY()` |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyAttributeScope#translationZ()` |

| ### Inherited functions |
|---|
| From [androidx.constraintlayout.compose.BaseKeyFrameScope](https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/BaseKeyFrameScope) |---|---| | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.properties/-observable-property/index.html<E>` | `<E : https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/NamedPropertyOrValue?> https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/BaseKeyFrameScope#addNameOnPropertyChange(androidx.constraintlayout.compose.NamedPropertyOrValue,kotlin.String)( initialValue: E, nameOverride: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html? )` Property delegate that updates the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/BaseKeyFrameScope#keyFramePropertiesValue()` map on value changes. | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.properties/-observable-property/index.html<T>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/BaseKeyFrameScope#addOnPropertyChange(kotlin.Any,kotlin.String)(initialValue: T, nameOverride: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` When changed, updates the value of type `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/BaseKeyFrameScope#addOnPropertyChange(kotlin.Any,kotlin.String)` on the `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/BaseKeyFrameScope#keyFramePropertiesValue()` map. | |

## Public properties

### alpha

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

```
var alpha: Float
```

### rotationX

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

```
var rotationX: Float
```

### rotationY

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

```
var rotationY: Float
```

### rotationZ

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

```
var rotationZ: Float
```

### scaleX

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

```
var scaleX: Float
```

### scaleY

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

```
var scaleY: Float
```

### translationX

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

```
var translationX: Dp
```

### translationY

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

```
var translationY: Dp
```

### translationZ

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

```
var translationZ: Dp
```