pub struct PasswordFieldProps {
pub label: String,
pub hint: Option<String>,
pub error: Option<String>,
pub show_label: String,
pub hide_label: String,
pub id: Option<String>,
pub name: Option<String>,
pub aria_describedby: Option<String>,
pub oninput: Option<EventHandler<FormEvent>>,
pub onchange: Option<EventHandler<FormEvent>>,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
}Expand description
Props for PasswordField.
Fields§
§label: StringVisible label. Defaults to Password.
hint: Option<String>Help text under the input, linked with aria-describedby.
error: Option<String>Validation message. A non-empty message marks the field and input invalid.
show_label: StringAccessible name of the toggle while the password is hidden. Defaults to Show password.
hide_label: StringAccessible name of the toggle while the password is visible. Defaults to Hide password.
id: Option<String>Id of the input. Defaults to ui-password- plus a generated id; the hint and error ids
derive from it ({id}-hint, {id}-error).
name: Option<String>Form field name of the input.
aria_describedby: Option<String>Ids of extra descriptions, listed before the hint and error in aria-describedby.
oninput: Option<EventHandler<FormEvent>>Fires on every edit.
onchange: Option<EventHandler<FormEvent>>Fires when the value is committed.
class: Option<String>Extra classes appended to the ui-field ui-password-field wrapper.
attributes: Vec<Attribute>Any other <input> or global attribute, such as value, autocomplete, or required.
They go on the input, like lumen-react.
Implementations§
Source§impl PasswordFieldProps
impl PasswordFieldProps
Sourcepub fn builder() -> PasswordFieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> PasswordFieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building PasswordFieldProps.
On the builder, call .label(...)(optional), .hint(...)(optional), .error(...)(optional), .show_label(...)(optional), .hide_label(...)(optional), .id(...)(optional), .name(...)(optional), .aria_describedby(...)(optional), .oninput(...)(optional), .onchange(...)(optional), .class(...)(optional), .attributes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of PasswordFieldProps.
Trait Implementations§
Source§impl Clone for PasswordFieldProps
impl Clone for PasswordFieldProps
Source§impl PartialEq for PasswordFieldProps
impl PartialEq for PasswordFieldProps
Source§impl Properties for PasswordFieldPropswhere
Self: Clone,
impl Properties for PasswordFieldPropswhere
Self: Clone,
Source§type Builder = PasswordFieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
type Builder = PasswordFieldPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
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 PasswordFieldProps
Auto Trait Implementations§
impl !RefUnwindSafe for PasswordFieldProps
impl !Send for PasswordFieldProps
impl !Sync for PasswordFieldProps
impl !UnwindSafe for PasswordFieldProps
impl Forget for PasswordFieldProps
impl Freeze for PasswordFieldProps
impl Move for PasswordFieldProps
impl Unpin for PasswordFieldProps
impl UnsafeUnpin for PasswordFieldPropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static UnsyncStorage: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
&'static Location<'static>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<Event<FormData>, ()>>>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
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,
impl<T> DependencyElement for T
impl<T> ErasedDestructor for Twhere
T: 'static,
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 more