pub struct Props {Show 51 fields
pub type: &'static str,
pub label: &'static str,
pub name: &'static str,
pub required: bool,
pub ref: NodeRef,
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: UseStateHandle<String>,
pub valid_handle: UseStateHandle<bool>,
pub validate_function: Callback<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>,
}
yew
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 str
The type of the input, e.g., โtextโ, โpasswordโ, etc.
label: &'static str
The label to be displayed for the input field.
name: &'static str
The name of the input field, used for form submission and accessibility.
required: bool
Indicates whether the input is required or not.
ref: NodeRef
A reference to the DOM node of the input element.
error_message: &'static str
The error message to display when there is a validation error.
input_class: &'static str
The CSS class to be applied to all inner elements.
field_class: &'static str
The CSS class to be applied to the inner input element and icon.
label_class: &'static str
The CSS class to be applied to the label for the input element.
class: &'static str
The CSS class to be applied to the input element.
error_class: &'static str
The CSS class to be applied to the error div element.
icon_class: &'static str
The CSS class to be applied to the icon element.
handle: UseStateHandle<String>
The state handle for managing the value of the input.
valid_handle: UseStateHandle<bool>
The state handle for managing the validity state of the input.
validate_function: Callback<String, bool>
A callback function to validate the input value. It takes a String
as input and returns a bool
.
eye_active: &'static str
The icon when the password is visible. Assuming fontawesome icons are used by default.
eye_disabled: &'static str
The icon when the password is not visible. Assuming fontawesome icons are used by default.
id: &'static str
The ID attribute of the input element.
placeholder: &'static str
The placeholder text to be displayed in the input element.
aria_label: &'static str
The aria-label attribute for screen readers, providing a label for accessibility.
aria_required: &'static str
The aria-required attribute for screen readers, indicating whether the input is required.
aria_invalid: &'static str
The aria-invalid attribute for screen readers, indicating whether the input value is invalid.
aria_describedby: &'static str
The aria-describedby attribute for screen readers, describing the input elementโs error message.
accept: &'static str
Hint for expected file type in file upload controls.
alt: &'static str
The alternative text for <input type="image">
. Required for accessibility.
autocapitalize: &'static str
Controls automatic capitalization in inputted text.
autocomplete: &'static str
Hint for the browserโs autofill feature.
capture: &'static str
Media capture input method in file upload controls.
checked: bool
Whether the control is checked (for checkboxes or radio buttons).
dirname: &'static str
Name of the form field to use for sending the elementโs directionality in form submission.
disabled: bool
Whether the form control is disabled.
form: &'static str
Associates the input with a specific form element.
formaction: &'static str
URL to use for form submission (for <input type="image" | "submit">
).
formenctype: &'static str
Form data set encoding type for submission (for <input type="image" | "submit">
).
formmethod: &'static str
HTTP method to use for form submission (for <input type="image" | "submit">
).
formnovalidate: bool
Bypass form validation for submission (for <input type="image" | "submit">
).
formtarget: &'static str
Browsing context for form submission (for <input type="image" | "submit">
).
height: Option<u32>
Same as the height
attribute for <img>
elements.
list: &'static str
ID of the <datalist>
element to use for autocomplete suggestions.
max: &'static str
The maximum value for date, number, range, etc.
maxlength: Option<usize>
Maximum length of the input value (in characters).
min: &'static str
The minimum value for date, number, range, etc.
minlength: Option<usize>
Minimum length of the input value (in characters).
multiple: bool
Boolean indicating whether multiple values are allowed (for file inputs, emails, etc.).
pattern: &'static str
Regex pattern the value must match to be valid.
readonly: bool
Boolean indicating whether the input is read-only.
size: Option<u32>
Size of the input field (e.g., character width).
src: &'static str
Address of the image resource for <input type="image">
.
step: &'static str
Incremental values that are valid for the input.
value: &'static str
The value of the control (used for two-way data binding).
width: Option<u32>
Same as the width
attribute for <img>
elements.
Trait Implementationsยง
Sourceยงimpl Properties for Props
impl Properties for Props
impl StructuralPartialEq for Props
Auto Trait Implementationsยง
impl Freeze for Props
impl !RefUnwindSafe for Props
impl !Send for Props
impl !Sync for Props
impl Unpin for Props
impl !UnwindSafe for Props
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.