---
title: "rsp"
description: "Extension property to convert an [Int] to a [RemoteTextUnit] in Sp."
type: "property"
lastmod: "2026-10-07"
---
## API Reference

> Source set: Android

```kotlin
public val Int.rsp: RemoteTextUnit
```

Extension property to convert an `Int` to a [RemoteTextUnit](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteTextUnit/api) in Sp.

> Source set: Android

```kotlin
public val Float.rsp: RemoteTextUnit
```

Extension property to convert a `Float` to a [RemoteTextUnit](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteTextUnit/api) in Sp.

> Source set: Android

```kotlin
public val RemoteFloat.rsp: RemoteTextUnit
```

Extension property to convert a [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat/api) to a [RemoteTextUnit](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteTextUnit/api) in Sp.

## Code Examples

### RemoteTextDynamicFontSizeSample

```kotlin
@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteTextDynamicFontSizeSample() {
    val fontScale = rememberNamedRemoteFloat("fontScale") { 1.2f.rf }
    val dynamicSize = (16f.rf * fontScale).rsp
    RemoteText(text = "Dynamic Size Text".rs, fontSize = dynamicSize)
}
```
