# remoteComponent

> Returns a [RemoteComponent] bound to the enclosing layout component.

## API Reference

### remoteComponent

> Source set: JvmAndAndroid

```kotlin
@Composable
public fun remoteComponent(): RemoteComponent
```

Returns a `RemoteComponent` bound to the enclosing layout component.

* Captures the enclosing layout component's identity at composition time.
* Resolves `RemoteComponent` properties to that component's ID regardless of where the resulting
`RemoteFloat` is consumed (such as in sibling modifiers, nested containers, or [RemoteCanvas](https://composables.com/jetpack-compose/androidx.compose.remote/remote-creation-compose/composable-functions/RemoteCanvas/api.md)
draw commands).

#### Return

[RemoteComponent](https://composables.com/jetpack-compose/androidx.compose.remote/remote-creation-compose/composable-functions/remoteComponent/api.md) bound to the current layout component in composition

## Code Examples

### RemoteComponentSample

```kotlin
@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteComponentSample() {
    RemoteColumn(modifier = RemoteModifier.size(200.rdp).background(Color.LightGray.rc)) {
        val parentHeight = remoteComponent().height
        RemoteBox(
            modifier =
                RemoteModifier.fillMaxWidth()
                    .height((parentHeight * 0.5f).toRemoteDp())
                    .background(Color.Blue.rc)
        )
    }
}
```
