pub struct InputProps {Show 15 fields
pub value: String,
pub placeholder: Option<String>,
pub input_type: InputType,
pub disabled: bool,
pub readonly: bool,
pub required: bool,
pub autofocus: bool,
pub onchange: Option<EventHandler<String>>,
pub onfocus: Option<EventHandler<FocusEvent>>,
pub onblur: Option<EventHandler<FocusEvent>>,
pub oninput: Option<EventHandler<FormEvent>>,
pub style: Option<String>,
pub class: Option<String>,
pub name: Option<String>,
pub id: Option<String>,
}Expand description
Input properties
Fields§
§value: StringCurrent value
placeholder: Option<String>Placeholder text
input_type: InputTypeInput type
disabled: boolDisabled state
readonly: boolRead-only state
required: boolRequired field
autofocus: boolAutofocus on mount
onchange: Option<EventHandler<String>>Change handler
onfocus: Option<EventHandler<FocusEvent>>Focus handler
onblur: Option<EventHandler<FocusEvent>>Blur handler
oninput: Option<EventHandler<FormEvent>>Input handler (real-time)
style: Option<String>Custom inline styles
class: Option<String>Custom class name
name: Option<String>Input name attribute
id: Option<String>Input id attribute
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), .disabled(...)(optional), .readonly(...)(optional), .required(...)(optional), .autofocus(...)(optional), .onchange(...)(optional), .onfocus(...)(optional), .onblur(...)(optional), .oninput(...)(optional), .style(...)(optional), .class(...)(optional), .name(...)(optional), .id(...)(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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more