pub struct InputProps {Show 50 fields
pub type: &'static str,
pub label: &'static str,
pub name: &'static str,
pub required: bool,
pub error_message: &'static str,
pub input_class: &'static str,
pub field_class: &'static str,
pub label_class: &'static str,
pub class: &'static str,
pub error_class: &'static str,
pub icon_class: &'static str,
pub handle: Signal<String>,
pub valid_handle: Signal<bool>,
pub validate_function: fn(String) -> bool,
pub eye_active: &'static str,
pub eye_disabled: &'static str,
pub id: &'static str,
pub placeholder: &'static str,
pub aria_label: &'static str,
pub aria_required: &'static str,
pub aria_invalid: &'static str,
pub aria_describedby: &'static str,
pub accept: &'static str,
pub alt: &'static str,
pub autocapitalize: &'static str,
pub autocomplete: &'static str,
pub capture: &'static str,
pub checked: bool,
pub dirname: &'static str,
pub disabled: bool,
pub form: &'static str,
pub formaction: &'static str,
pub formenctype: &'static str,
pub formmethod: &'static str,
pub formnovalidate: bool,
pub formtarget: &'static str,
pub height: Option<u32>,
pub list: &'static str,
pub max: &'static str,
pub maxlength: Option<usize>,
pub min: &'static str,
pub minlength: Option<usize>,
pub multiple: bool,
pub pattern: &'static str,
pub readonly: bool,
pub size: Option<u32>,
pub src: &'static str,
pub step: &'static str,
pub value: &'static str,
pub width: Option<u32>,
}dio only.Expand description
Props for a custom input component.
This struct includes all possible attributes for an HTML <input> element.
See MDN docs for more details.
Fieldsยง
ยงtype: &'static strThe type of the input, e.g., โtextโ, โpasswordโ, etc.
label: &'static strThe label to be displayed for the input field.
name: &'static strThe name of the input field, used for form submission and accessibility.
required: boolIndicates whether the input is required or not.
error_message: &'static strThe error message to display when there is a validation error.
input_class: &'static strThe CSS class to be applied to all inner elements.
field_class: &'static strThe CSS class to be applied to the inner input element and icon.
label_class: &'static strThe CSS class to be applied to the label for the input element.
class: &'static strThe CSS class to be applied to the input element.
error_class: &'static strThe CSS class to be applied to the error div element.
icon_class: &'static strThe CSS class to be applied to the icon element.
handle: Signal<String>The state handle for managing the value of the input.
valid_handle: Signal<bool>The state handle for managing the validity state of the input.
validate_function: fn(String) -> boolA callback function to validate the input value. It takes a String as input and returns a bool.
eye_active: &'static strThe icon when the password is visible. Assuming fontawesome icons are used by default.
eye_disabled: &'static strThe icon when the password is not visible. Assuming fontawesome icons are used by default.
id: &'static strThe ID attribute of the input element.
placeholder: &'static strThe placeholder text to be displayed in the input element.
aria_label: &'static strThe aria-label attribute for screen readers, providing a label for accessibility.
aria_required: &'static strThe aria-required attribute for screen readers, indicating whether the input is required.
aria_invalid: &'static strThe aria-invalid attribute for screen readers, indicating whether the input value is invalid.
aria_describedby: &'static strThe aria-describedby attribute for screen readers, describing the input elementโs error message.
accept: &'static strHint for expected file type in file upload controls.
alt: &'static strThe alternative text for <input type="image">. Required for accessibility.
autocapitalize: &'static strControls automatic capitalization in inputted text.
autocomplete: &'static strHint for the browserโs autofill feature.
capture: &'static strMedia capture input method in file upload controls.
checked: boolWhether the control is checked (for checkboxes or radio buttons).
dirname: &'static strName of the form field to use for sending the elementโs directionality in form submission.
disabled: boolWhether the form control is disabled.
form: &'static strAssociates the input with a specific form element.
formaction: &'static strURL to use for form submission (for <input type="image" | "submit">).
formenctype: &'static strForm data set encoding type for submission (for <input type="image" | "submit">).
formmethod: &'static strHTTP method to use for form submission (for <input type="image" | "submit">).
formnovalidate: boolBypass form validation for submission (for <input type="image" | "submit">).
formtarget: &'static strBrowsing context for form submission (for <input type="image" | "submit">).
height: Option<u32>Same as the height attribute for <img> elements.
list: &'static strID of the <datalist> element to use for autocomplete suggestions.
max: &'static strThe maximum value for date, number, range, etc.
maxlength: Option<usize>Maximum length of the input value (in characters).
min: &'static strThe minimum value for date, number, range, etc.
minlength: Option<usize>Minimum length of the input value (in characters).
multiple: boolBoolean indicating whether multiple values are allowed (for file inputs, emails, etc.).
pattern: &'static strRegex pattern the value must match to be valid.
readonly: boolBoolean indicating whether the input is read-only.
size: Option<u32>Size of the input field (e.g., character width).
src: &'static strAddress of the image resource for <input type="image">.
step: &'static strIncremental values that are valid for the input.
value: &'static strThe value of the control (used for two-way data binding).
width: Option<u32>Same as the width attribute for <img> elements.
Implementationsยง
Sourceยงimpl InputProps
impl InputProps
Sourcepub fn builder() -> InputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> InputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building InputProps.
On the builder, call .r#type(...)(optional), .label(...)(optional), .name(...)(optional), .required(...)(optional), .error_message(...)(optional), .input_class(...)(optional), .field_class(...)(optional), .label_class(...)(optional), .class(...)(optional), .error_class(...)(optional), .icon_class(...)(optional), .handle(...), .valid_handle(...), .validate_function(...), .eye_active(...)(optional), .eye_disabled(...)(optional), .id(...)(optional), .placeholder(...)(optional), .aria_label(...)(optional), .aria_required(...)(optional), .aria_invalid(...)(optional), .aria_describedby(...)(optional), .accept(...)(optional), .alt(...)(optional), .autocapitalize(...)(optional), .autocomplete(...)(optional), .capture(...)(optional), .checked(...)(optional), .dirname(...)(optional), .disabled(...)(optional), .form(...)(optional), .formaction(...)(optional), .formenctype(...)(optional), .formmethod(...)(optional), .formnovalidate(...)(optional), .formtarget(...)(optional), .height(...)(optional), .list(...)(optional), .max(...)(optional), .maxlength(...)(optional), .min(...)(optional), .minlength(...)(optional), .multiple(...)(optional), .pattern(...)(optional), .readonly(...)(optional), .size(...)(optional), .src(...)(optional), .step(...)(optional), .value(...)(optional), .width(...)(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 moreSourceยงimpl PartialEq for InputProps
impl PartialEq for InputProps
Sourceยงimpl Properties for InputPropswhere
Self: Clone,
impl Properties for InputPropswhere
Self: Clone,
Sourceยงtype Builder = InputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
type Builder = InputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Sourceยงfn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Sourceยงfn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
impl StructuralPartialEq for InputProps
Auto Trait Implementationsยง
impl Freeze for InputProps
impl !RefUnwindSafe for InputProps
impl !Send for InputProps
impl !Sync for InputProps
impl Unpin for InputProps
impl !UnwindSafe for InputProps
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Sourceยงfn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงimpl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Sourceยงfn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
self to a value of a Properties struct.Sourceยงimpl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Sourceยงfn into_prop_value(self) -> T
fn into_prop_value(self) -> T
self to a value of a Properties struct.