pub struct OutlinedTextFieldConfig {
pub label: Option<String>,
pub placeholder: Option<String>,
pub leading_icon: Option<View>,
pub trailing_icon: Option<View>,
pub single_line: bool,
pub is_error: bool,
pub enabled: bool,
pub on_submit: Option<Rc<dyn Fn(String)>>,
pub colors: Option<TextFieldColors>,
}Expand description
Configuration for an OutlinedTextField.
Fields§
§label: Option<String>Floating label shown above the input when the field has text or is focused. When set, this acts as the visual placeholder (the TextField’s own placeholder is suppressed). When the label floats, it animates to the top border.
placeholder: Option<String>Placeholder text shown inside the TextField when empty and unfocused.
Only shown when label is None; when a label is present the label
itself serves as the visual placeholder.
leading_icon: Option<View>Icon displayed at the start of the input.
trailing_icon: Option<View>Icon displayed at the end of the input.
single_line: boolIf true, Enter submits; if false, Enter inserts a newline.
is_error: boolIf true, border and label color switch to error color.
enabled: boolIf false, input is visually disabled and on_value_change won’t fire.
on_submit: Option<Rc<dyn Fn(String)>>Called when the user presses Enter on a single-line field.
colors: Option<TextFieldColors>Colors for all text field UI elements.
Trait Implementations§
Source§impl Clone for OutlinedTextFieldConfig
impl Clone for OutlinedTextFieldConfig
Source§fn clone(&self) -> OutlinedTextFieldConfig
fn clone(&self) -> OutlinedTextFieldConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more