Text Input

text input

Text Input fields allow users to add and edit text.

Usage

text input

XelaTextField(
    placeholder = "TextFiled Placeholder",
    textState = remember { mutableStateOf(TextFieldValue()) },
    state = remember { mutableStateOf(XelaTextFieldState.DEFAULT) }
)

Properties

Name Type Default Value Required Description
placeholder String - YES Textfield placeholder text
textState MutableState<TextFieldValue> - YES MutableState TextFieldValue
state MutableState<XelaTextareaState> - YES Mutable textfield state (DEFAULT, ERROR, SUCCESS, FOCUS, DISABLED)
helperText String? null NO Textfield helper text
leftIcon Int? null NO Left Icon name from Drawable
rightIcon Int? null NO Right Icon name from Drawable
disableAutocorrection Boolean true NO Textfield autocorrection disable
secureField Boolean false NO Textfield as Securefield
background Color Color.White NO Textfield background color
disabledBackground Color XelaColor.Gray12 NO Disable Textfield background color
placeholderColor Color XelaColor.Gray8 NO Placeholder color
textfieldColor Color XelaColor.Gray NO Textfield text color
disabledTextfieldColor Color XelaColor.Gray8 NO Disabled textfield text color
borderDefaultColor Color XelaColor.Gray11 NO Textfield default border color
borderDisabledColor Color XelaColor.Gray8 NO Textfield disabled border color
borderErrorColor Color XelaColor.Red3 NO Textfield error border color
borderSuccessColor Color XelaColor.Green1 NO Textfield success border color
borderFocusColor Color XelaColor.Blue5 NO Textfield focus border color
iconDefaultColor Color? null NO Icons default color
iconDisabledColor Color XelaColor.Gray8 NO Icons disabled color
iconErrorColor Color XelaColor.Red3 NO Icons error color
iconSuccessColor Color XelaColor.Green1 NO Icons success color
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 Textfield keyboard type