SKTextField
SKTextField covers the full input lifecycle: idle, focused, filled, error, disabled and read-only. It ships with leading/trailing slots, character counters and a validation contract that the SKOne Form Framework binds to directly. Since 1.3.2-alpha03 the Compose implementation adds an integrated floating-label outlined field — the label transitions between resting and floating states, with refined focus, hint, supporting-text, error, disabled and required states. The public API is unchanged, and the XML implementation keeps its existing label behaviour.
Usage
SKTextField(
value = email,
onValueChange = { email = it },
label = "Work email",
hint = "Enter your work email"
)Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | String | — | Current field value. |
| onValueChange | (String) -> Unit | — | Change callback. |
| label | String? | null | Integrated label; in Compose it transitions between resting and floating states. |
| hint | String? | null | Hint shown while the field is empty and unfocused. |
| variant | SKFieldVariant | Outlined | Outlined, Filled or Underlined. |
| error | String? | null | Error text; switches the field to the error state. |
Accessibility
Label is programmatically associated with the field, error text is announced via a live region, and the touch target is at least 48dp.
Theming
Outline, filled and underlined variants read from SKTheme.shapes and SKTheme.colors.
API surface
- SKTextField
- SKFieldVariant
- SKFieldState