RemoteText

Functions summary

Unit
@Composable
@RemoteComposable
RemoteText(
    text: RemoteString,
    modifier: RemoteModifier,
    color: RemoteColor?,
    fontSize: RemoteTextUnit?,
    fontStyle: FontStyle?,
    fontWeight: FontWeight?,
    fontFamily: FontFamily?,
    textAlign: TextAlign?,
    overflow: TextOverflow,
    maxLines: Int,
    style: RemoteTextStyle,
    fontVariationSettings: FontVariation.Settings?
)

High level element that displays text and provides semantics / accessibility information.

Functions

@Composable
@RemoteComposable
fun RemoteText(
    text: RemoteString,
    modifier: RemoteModifier = RemoteModifier,
    color: RemoteColor? = null,
    fontSize: RemoteTextUnit? = null,
    fontStyle: FontStyle? = null,
    fontWeight: FontWeight? = null,
    fontFamily: FontFamily? = null,
    textAlign: TextAlign? = LocalTextConfiguration.current.textAlign,
    overflow: TextOverflow = LocalTextConfiguration.current.overflow,
    maxLines: Int = LocalTextConfiguration.current.maxLines,
    style: RemoteTextStyle = LocalRemoteTextStyle.current,
    fontVariationSettings: FontVariation.Settings? = null
): Unit

High level element that displays text and provides semantics / accessibility information.

For ease of use, commonly used parameters from androidx.compose.ui.text.TextStyle are also present here. The order of precedence is as follows:

Parameters
text: RemoteString

The text to be displayed.

modifier: RemoteModifier = RemoteModifier

Modifier to apply to this layout node.

color: RemoteColor? = null

Color to apply to the text.

fontSize: RemoteTextUnit? = null

The size of glyphs to use when painting the text. See androidx.compose.ui.text.TextStyle.fontSize.

fontStyle: FontStyle? = null

The typeface variant to use when drawing the letters (e.g., italic). See androidx.compose.ui.text.TextStyle.fontStyle.

fontWeight: FontWeight? = null

The typeface thickness to use when painting the text (e.g., FontWeight.Bold).

fontFamily: FontFamily? = null

The font family to be used when rendering the text. See androidx.compose.ui.text.TextStyle.fontFamily.

textAlign: TextAlign? = LocalTextConfiguration.current.textAlign

The alignment of the text within the lines of the paragraph. See androidx.compose.ui.text.TextStyle.textAlign.

overflow: TextOverflow = LocalTextConfiguration.current.overflow

How visual overflow should be handled.

maxLines: Int = LocalTextConfiguration.current.maxLines

An optional maximum number of lines for the text to span.

style: RemoteTextStyle = LocalRemoteTextStyle.current

Style configuration for the text such as color, font, line height etc.

fontVariationSettings: FontVariation.Settings? = null

The font variation settings to be applied to the text.