Textarea

textarea

The textarea component is used for multi-line text input.

Usage

textarea

XelaTextarea(
    value = remember { mutableStateOf(TextFieldValue())},
    placeholder = "Placeholder",
    state = remember { mutableStateOf(XelaTextareaState.DEFAULT)},
    helperText = null,
    counter = false,
    placeholderColor = XelaColor.Gray8,
    counterColor = XelaColor.Gray8,
    defaultHelperTextColor = XelaColor.Gray8,
    defaultTextfieldColor = XelaColor.Gray2,
    borderDefaultColor = XelaColor.Gray11,
    background = Color.White,
    borderFocusColor = XelaColor.Blue3
)

Properties

Name Type Default Value Required Description
value MutableState<TextFieldValue> - YES MutableState TextFieldValue
helperText String? null NO Textarea helper text
placeholder String - YES Textarea placeholder text
state MutableState<XelaTextareaState> - YES Mutable textarea state (DEFAULT, ERROR, SUCCESS, FOCUS, DISABLED)
disableAutocorrection Boolean true NO Disable textarea autocorrection
counter Booleann false NO Show textarea symbols counter
maxSymbols Int 200 NO Textarea max symbols for counter
placeholderColor Color XelaColor.Gray8 NO Textarea placeholder color
counterColor Color XelaColor.Gray8 NO Textarea counter color
disabledTextareaColor Color XelaColor.Gray8 NO Textarea disabled text color
errorTextareaColor Color XelaColor.Red3 NO Textarea error text color
defaultTextareaColor Color XelaColor.Gray2 NO Textarea default text color
borderDefaultColor Color XelaColor.Gray11 NO Textarea default border color
borderDisabledColor Color XelaColor.Gray8 NO Textarea disabled border color
borderErrorColor Color XelaColor.Red3 NO Textarea error border color
borderSuccessColor Color XelaColor.Green1 NO Textarea success border color
borderFocusColor Color XelaColor.Blue5 NO Textarea focus border color
background Color Color.White NO Textarea background
disabledBackground Color XelaColor.Gray12 NO Textarea disabled background
defaultHelperTextColor Color XelaColor.Gray8 NO Default helper text color
disabledHelperTextColor Color XelaColor.Gray8 NO Disabled helper text color
errorHelperTextColor Color XelaColor.Red3 NO Error helper text color
successHelperTextColor Color XelaColor.Green1 NO Success helper text color
keyboardType KeyboardType KeyboardType.Text NO Textarea keyboard type