Skip to main content

TextField

Function TextField 

Source
pub fn TextField(
    modifier: Modifier,
    value: String,
    on_value_change: impl Fn(String) + 'static,
    config: TextFieldConfig,
) -> View
Expand description

M3 Filled Text Field with floating label, leading/trailing icons, error state, and a bottom indicator line. (Equivalent to Compose Material3’s TextField.)

The label floats up when value is non-empty or when the field is focused. Container: SurfaceContainerHighest bg, top-rounded corners (4dp), flat bottom. Indicator: always visible, 1dp (unfocused) / 2dp (focused/error), animated color+thickness.