pub struct Props {Show 22 fields
pub input_type: Option<String>,
pub label: String,
pub name: String,
pub icon: String,
pub required: bool,
pub input_ref: NodeRef,
pub error_message: String,
pub form_input_class: String,
pub form_input_field_class: String,
pub form_input_label_class: String,
pub form_input_input_class: String,
pub form_input_error_class: String,
pub icon_class: String,
pub input_handle: UseStateHandle<String>,
pub input_valid_handle: UseStateHandle<bool>,
pub validate_function: Callback<String, bool>,
pub input_id: Option<String>,
pub input_placeholder: Option<String>,
pub aria_label: Option<String>,
pub aria_required: Option<String>,
pub aria_invalid: Option<String>,
pub aria_describedby: Option<String>,
}Expand description
Props for a custom input component.
Fields§
§input_type: Option<String>The type of the input, e.g., “text”, “email”, “password”, etc.
label: StringThe label to be displayed for the input field.
name: StringThe name of the input field, used for form submission and accessibility.
icon: StringThe icon class to be used for displaying an icon alongside the input.
required: boolIndicates whether the input is required or not.
input_ref: NodeRefA reference to the DOM node of the input element.
error_message: StringThe error message to display when there is a validation error.
form_input_class: StringThe CSS class to be applied to all inner elements.
form_input_field_class: StringThe CSS class to be applied to the inner input element and icon.
form_input_label_class: StringThe CSS class to be applied to the label for the input element.
form_input_input_class: StringThe CSS class to be applied to the input element.
form_input_error_class: StringThe CSS class to be applied to the error div element.
icon_class: StringThe CSS class to be applied to the icon element.
input_handle: UseStateHandle<String>The state handle for managing the value of the input.
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.
input_id: Option<String>The ID attribute of the input element.
input_placeholder: Option<String>The placeholder text to be displayed in the input element.
aria_label: Option<String>The aria-label attribute for screen readers, providing a label for accessibility.
aria_required: Option<String>The aria-required attribute for screen readers, indicating whether the input is required.
aria_invalid: Option<String>The aria-invalid attribute for screen readers, indicating whether the input value is invalid.
aria_describedby: Option<String>The aria-describedby attribute for screen readers, describing the input element’s error message.
Trait Implementations§
source§impl PartialEq<Props> for Props
impl PartialEq<Props> for Props
source§impl Properties for Props
impl Properties for Props
impl StructuralPartialEq for Props
Auto Trait Implementations§
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> 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> 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.