Google is committed to advancing racial equity for Black communities. See how.

androidx.compose.foundation.text

Classes

InlineTextContent

A data class that stores a composable to be inserted into the text layout.

KeyboardOptions

The keyboard configuration options for TextFields.

Top-level functions summary

Unit
BasicText(text: String, modifier: Modifier = Modifier, style: TextStyle = TextStyle.Default, onTextLayout: (TextLayoutResult) -> Unit = {}, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE)

Basic element that displays text and provides semantics / accessibility information.

Unit
BasicText(text: AnnotatedString, modifier: Modifier = Modifier, style: TextStyle = TextStyle.Default, onTextLayout: (TextLayoutResult) -> Unit = {}, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, inlineContent: Map<String, InlineTextContent> = mapOf())

Basic element that displays text and provides semantics / accessibility information.

Unit
BasicTextField(value: String, onValueChange: (String) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, readOnly: Boolean = false, textStyle: TextStyle = TextStyle.Default, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, singleLine: Boolean = false, maxLines: Int = Int.MAX_VALUE, onImeActionPerformed: (ImeAction) -> Unit = {}, visualTransformation: VisualTransformation = VisualTransformation.None, onTextLayout: (TextLayoutResult) -> Unit = {}, onTextInputStarted: (SoftwareKeyboardController) -> Unit = {}, interactionState: InteractionState = remember { InteractionState() }, cursorColor: Color = Color.Black)

Basic composable that enables users to edit text via hardware or software keyboard, but provides no decorations like hint or placeholder.

Unit
BasicTextField(value: TextFieldValue, onValueChange: (TextFieldValue) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, readOnly: Boolean = false, textStyle: TextStyle = TextStyle.Default, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, singleLine: Boolean = false, maxLines: Int = Int.MAX_VALUE, onImeActionPerformed: (ImeAction) -> Unit = {}, visualTransformation: VisualTransformation = VisualTransformation.None, onTextLayout: (TextLayoutResult) -> Unit = {}, onTextInputStarted: (SoftwareKeyboardController) -> Unit = {}, interactionState: InteractionState = remember { InteractionState() },