Jenga Text Field
A single- or multi-line text input.
Built on Compose Foundation's BasicTextField, so its look is governed entirely by Jenga tokens. The border reflects focus and status; an optional supportingText sits below and is colored to match the status.
Parameters
the current text.
called when the text changes.
the Modifier for the whole field (label + box + support).
optional label shown above the field.
optional hint shown when value is empty.
validation status; see JengaTextFieldStatus.
optional helper/error text shown below the field.
whether the field is editable.
whether the field is read-only (focusable but not editable).
whether the field is constrained to one line.
optional icon at the start (inherits the content color).
optional icon at the end (inherits the content color).
transforms the displayed text (e.g. password).
software-keyboard configuration.
IME action handlers.
the field shape; defaults to JengaTextFieldDefaults.shape.
the color set; defaults to JengaTextFieldDefaults.colors.
the input and placeholder text style.
the minimum height of the input box.
padding inside the input box.
width of the soft focus halo; 0.dp removes it. Defaults to the theme's JengaTextFieldStyle.focusRingWidth, else JengaTextFieldDefaults.FocusRingWidth.
Samples
var value by remember {
mutableStateOf(
value = "",
)
}
JengaTextField(
value = value,
onValueChange = { value = it },
label = "Ticket code",
placeholder = "TKT-…",
)