---
title: "sharedBounds"
description: "Marks this component as a shared bounds container that smoothly transitions its bounds, position, and styling between states in a state layout."
type: "function"
lastmod: "2026-09-24"
---
## API Reference

### sharedBounds

> Source set: Android

```kotlin
public fun RemoteModifier.sharedBounds(
    key: Int,
    spec: RemoteTweenSpec = remoteTween(),
    enter: RemoteEnterTransition = RemoteEnterTransition.FadeIn,
    exit: RemoteExitTransition = RemoteExitTransition.FadeOut,
): RemoteModifier
```

Marks this component as a shared bounds container that smoothly transitions its bounds, position,
and styling between states in a state layout.

#### Parameters

| | |
| --- | --- |
| key | unique integer identifier matching this container across states |
| spec | animation specification for bounds and transforms (e.g. [remoteTween](/jetpack-compose/androidx.compose.remote/remote-creation-compose/functions/remoteTween)) |
| enter | transition effect when component enters the layout |
| exit | transition effect when component exits the layout |
