Start native apps faster with the Composables CLI ->
Composable Function

RemoteText

Remote composable that displays text.

RemoteTextSample

@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteTextSample() {
    RemoteText(text = "Hello Remote Compose".rs, color = Color.Blue.rc, fontSize = 20.rsp)
}

RemoteTextStylingSample

@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteTextStylingSample() {
    RemoteText(
        text = "Bold & Italic".rs,
        fontWeight = FontWeight.Bold,
        fontStyle = FontStyle.Italic,
    )
}

RemoteTextFontFamilySample

@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteTextFontFamilySample() {
    RemoteColumn {
        RemoteText(text = "Serif".rs, fontFamily = RemoteFontFamily.Serif)
        RemoteText(text = "Sans Serif".rs, fontFamily = RemoteFontFamily.SansSerif)
        RemoteText(text = "Monospace".rs, fontFamily = RemoteFontFamily.Monospace)
        RemoteText(text = "ExtraBold".rs, fontWeight = FontWeight.ExtraBold)
        RemoteText(
            text = "Named Flex Font with Variations".rs,
            fontFamily = RemoteFontFamily.Named("device:roboto-flex"),
            fontVariationSettings =
                FontVariation.Settings(FontVariation.weight(300), FontVariation.width(70f)),
        )
    }
}