pub struct PasswordToggleFieldProps {Show 17 fields
pub value: Option<String>,
pub placeholder: Option<String>,
pub disabled: Option<bool>,
pub required: Option<bool>,
pub readonly: Option<bool>,
pub visible: Option<bool>,
pub min_length: Option<usize>,
pub max_length: Option<usize>,
pub strength_requirements: Option<PasswordStrengthRequirements>,
pub on_change: Option<Callback<String>>,
pub on_visibility_toggle: Option<Callback<bool>>,
pub on_focus: Option<Callback<()>>,
pub on_blur: Option<Callback<()>>,
pub on_validation: Option<Callback<PasswordValidation>>,
pub class: Option<String>,
pub style: Option<String>,
pub children: Option<Box<dyn FnOnce() -> AnyView + Send>>,
}Expand description
Props for the PasswordToggleField component.
Password Toggle Field component with visibility toggle
§Required Props
- children:
Option<Children>- Children content
§Optional Props
- value:
String- Input value
- placeholder:
String- Placeholder text
- disabled:
bool- Whether the field is disabled
- required:
bool- Whether the field is required
- readonly:
bool- Whether the field is read-only
- visible:
bool- Whether the password is visible
- min_length:
usize- Minimum password length
- max_length:
usize- Maximum password length
- strength_requirements:
PasswordStrengthRequirements- Password strength requirements
- on_change:
Callback<String>- Callback when value changes
- on_visibility_toggle:
Callback<bool>- Callback when visibility toggles
- on_focus:
Callback<()>- Callback when field is focused
- on_blur:
Callback<()>- Callback when field is blurred
- on_validation:
Callback<PasswordValidation>- Callback when field is validated
- class:
String- Additional CSS classes
- style:
String- Inline styles
Fields§
§value: Option<String>Input value
placeholder: Option<String>Placeholder text
disabled: Option<bool>Whether the field is disabled
required: Option<bool>Whether the field is required
readonly: Option<bool>Whether the field is read-only
visible: Option<bool>Whether the password is visible
min_length: Option<usize>Minimum password length
max_length: Option<usize>Maximum password length
strength_requirements: Option<PasswordStrengthRequirements>Password strength requirements
on_change: Option<Callback<String>>Callback when value changes
on_visibility_toggle: Option<Callback<bool>>Callback when visibility toggles
on_focus: Option<Callback<()>>Callback when field is focused
on_blur: Option<Callback<()>>Callback when field is blurred
on_validation: Option<Callback<PasswordValidation>>Callback when field is validated
class: Option<String>Additional CSS classes
style: Option<String>Inline styles
children: Option<Box<dyn FnOnce() -> AnyView + Send>>Children content
Implementations§
Source§impl PasswordToggleFieldProps
impl PasswordToggleFieldProps
Sourcepub fn builder() -> PasswordToggleFieldPropsBuilder
pub fn builder() -> PasswordToggleFieldPropsBuilder
Create a builder for building PasswordToggleFieldProps.
On the builder, call .value(...)(optional), .placeholder(...)(optional), .disabled(...)(optional), .required(...)(optional), .readonly(...)(optional), .visible(...)(optional), .min_length(...)(optional), .max_length(...)(optional), .strength_requirements(...)(optional), .on_change(...)(optional), .on_visibility_toggle(...)(optional), .on_focus(...)(optional), .on_blur(...)(optional), .on_validation(...)(optional), .class(...)(optional), .style(...)(optional), .children(...) to set the values of the fields.
Finally, call .build() to create the instance of PasswordToggleFieldProps.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PasswordToggleFieldProps
impl !RefUnwindSafe for PasswordToggleFieldProps
impl Send for PasswordToggleFieldProps
impl !Sync for PasswordToggleFieldProps
impl Unpin for PasswordToggleFieldProps
impl !UnwindSafe for PasswordToggleFieldProps
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> 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 more