TextArea

@Composable
fun TextArea(state: TextFieldState, modifier: Modifier = Modifier, enabled: Boolean = true, readOnly: Boolean = false, outline: Outline = Outline.None, placeholder: @Composable () -> Unit? = null, undecorated: Boolean = false, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, maxLines: Int = Int.MAX_VALUE, style: TextAreaStyle = JewelTheme.textAreaStyle, textStyle: TextStyle = JewelTheme.defaultTextStyle, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, showScrollbar: Boolean = true)

Parameters

placeholder

the optional placeholder to be displayed over the component when the value is empty.


@Composable
fun TextArea(value: String, onValueChange: (String) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, readOnly: Boolean = false, outline: Outline = Outline.None, placeholder: @Composable () -> Unit? = null, undecorated: Boolean = false, visualTransformation: VisualTransformation = VisualTransformation.None, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, keyboardActions: KeyboardActions = KeyboardActions(), maxLines: Int = Int.MAX_VALUE, onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextAreaStyle = JewelTheme.textAreaStyle, textStyle: TextStyle = JewelTheme.defaultTextStyle, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })
@Composable
fun TextArea(value: TextFieldValue, onValueChange: (TextFieldValue) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, readOnly: Boolean = false, placeholder: @Composable () -> Unit? = null, undecorated: Boolean = false, outline: Outline = Outline.None, visualTransformation: VisualTransformation = VisualTransformation.None, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, keyboardActions: KeyboardActions = KeyboardActions(), maxLines: Int = Int.MAX_VALUE, onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextAreaStyle = JewelTheme.textAreaStyle, textStyle: TextStyle = JewelTheme.defaultTextStyle, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

Deprecated

Please use TextArea(state) instead. If you want to observe text changes, use snapshotFlow { state.text }

Parameters

placeholder

the optional placeholder to be displayed over the component when the value is empty.