Skip to main content

Module basic_text_field

Module basic_text_field 

Source
Expand description

BasicTextField widget for editable text input.

This module provides the BasicTextField composable following Jetpack Compose’s BasicTextField pattern from compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicTextField.kt.

Structs§

BasicTextFieldDecorationScope
Scope passed to a basic text field decoration box.
BasicTextFieldOptions
Options for customizing BasicTextField appearance and behavior.

Constants§

SELECTION_HIGHLIGHT_ALPHA
Alpha of the selection highlight relative to the field’s accent (TextFieldOptions::cursor_color): the reference highlight is the tint at ~0.32 opacity, while the caret and both selection handles carry it solid — one accent drives all three.

Functions§

BasicTextField
Edits text through a retained TextFieldState. modifier controls the field bounds and input, and style controls the text. Use BasicTextFieldWithOptions for line limits, cursor color and edit callbacks.
BasicTextFieldDecorated
Creates an editable field and lets decoration_box place composable labels, placeholders, icons, buttons, prefixes, or suffixes around it.
BasicTextFieldWithOptions
Creates an editable text field with custom options.