pub struct InputProps {Show 24 fields
pub value: Option<String>,
pub placeholder: Option<String>,
pub input_type: InputType,
pub size: Option<InputSize>,
pub disabled: bool,
pub readonly: bool,
pub clearable: bool,
pub show_password: bool,
pub error: bool,
pub label: Option<String>,
pub prefix_icon: Option<String>,
pub suffix_icon: Option<String>,
pub maxlength: Option<u32>,
pub minlength: Option<u32>,
pub autofocus: bool,
pub name: Option<String>,
pub id: Option<String>,
pub on_input: Option<EventHandler<FormEvent>>,
pub on_change: Option<EventHandler<FormEvent>>,
pub on_focus: Option<EventHandler<FocusEvent>>,
pub on_blur: Option<EventHandler<FocusEvent>>,
pub on_keydown: Option<EventHandler<KeyboardEvent>>,
pub class: Option<String>,
pub style: Option<String>,
}Expand description
Input props for the theme-chalk styled input component
Fields§
§value: Option<String>Input value
placeholder: Option<String>Input placeholder
input_type: InputTypeInput type
size: Option<InputSize>Input size
disabled: boolWhether the input is disabled
readonly: boolWhether the input is readonly
clearable: boolWhether to show clear button
show_password: boolWhether to show password toggle (for password inputs)
error: boolWhether the input has error state
label: Option<String>Input label
prefix_icon: Option<String>Input prefix icon (CSS class)
suffix_icon: Option<String>Input suffix icon (CSS class)
maxlength: Option<u32>Maximum length
minlength: Option<u32>Minimum length
autofocus: boolWhether to auto focus
name: Option<String>Name attribute
id: Option<String>Id attribute
on_input: Option<EventHandler<FormEvent>>Input event handler
on_change: Option<EventHandler<FormEvent>>Change event handler
on_focus: Option<EventHandler<FocusEvent>>Focus event handler
on_blur: Option<EventHandler<FocusEvent>>Blur event handler
on_keydown: Option<EventHandler<KeyboardEvent>>Key down event handler
class: Option<String>Additional CSS classes
style: Option<String>Inline styles
Implementations§
Source§impl InputProps
impl InputProps
Sourcepub fn builder() -> InputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> InputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building InputProps.
On the builder, call .value(...)(optional), .placeholder(...)(optional), .input_type(...)(optional), .size(...)(optional), .disabled(...)(optional), .readonly(...)(optional), .clearable(...)(optional), .show_password(...)(optional), .error(...)(optional), .label(...)(optional), .prefix_icon(...)(optional), .suffix_icon(...)(optional), .maxlength(...)(optional), .minlength(...)(optional), .autofocus(...)(optional), .name(...)(optional), .id(...)(optional), .on_input(...)(optional), .on_change(...)(optional), .on_focus(...)(optional), .on_blur(...)(optional), .on_keydown(...)(optional), .class(...)(optional), .style(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of InputProps.
Trait Implementations§
Source§impl Clone for InputProps
impl Clone for InputProps
Source§fn clone(&self) -> InputProps
fn clone(&self) -> InputProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl PartialEq for InputProps
impl PartialEq for InputProps
Source§fn eq(&self, other: &InputProps) -> bool
fn eq(&self, other: &InputProps) -> bool
self and other values to be equal, and is used by ==.