# KeyPositionScope

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


```
@ExperimentalMotionApi
@LayoutScopeMarker
class KeyPositionScope : 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.KeyPositionScope](https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyPositionScope) |

*** ** * ** ***

Scope to define KeyFrame positions.

These are modifications on the widget's position and size relative to its final state on the current transition.

## Summary

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/CurveFit?` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyPositionScope#curveFit()` Type of fit applied to the curve. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyPositionScope#percentHeight()` The height as a percentage of the height at the end `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyPositionScope#percentWidth()` The width as a percentage of the width at the end `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyPositionScope#percentX()` The position as a percentage of the X axis of the current coordinate space. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyPositionScope#percentY()` The position as a percentage of the Y axis of the current coordinate space. |

| ### 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

### curveFit

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

```
var curveFit: CurveFit?
```

Type of fit applied to the curve. `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/CurveFit#Spline()` by default.

### percentHeight

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

```
var percentHeight: Float
```

The height as a percentage of the height at the end `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet`.

### percentWidth

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

```
var percentWidth: Float
```

The width as a percentage of the width at the end `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet`.

### percentX

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

```
var percentX: Float
```

The position as a percentage of the X axis of the current coordinate space.

Where 0 is the position at the **start** `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet` and 1 is at the **end** `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet`.

The coordinate space is defined by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyPositionsScope#type()`.

### percentY

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

```
var percentY: Float
```

The position as a percentage of the Y axis of the current coordinate space.

Where 0 is the position at the **start** `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet` and 1 is at the **end** `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/ConstraintSet`.

The coordinate space is defined by `https://developer.android.com/reference/kotlin/androidx/constraintlayout/compose/KeyPositionsScope#type()`.