pub struct FieldProps {Show 22 fields
pub id: &'static str,
pub name: &'static str,
pub type: &'static str,
pub label: &'static str,
pub placeholder: &'static str,
pub helper_text: &'static str,
pub validation_state: ValidationState,
pub required: bool,
pub disabled: bool,
pub full_width: bool,
pub variant: Variant,
pub color: Color,
pub size: Size,
pub pattern: &'static str,
pub maxlength: Option<usize>,
pub minlength: Option<usize>,
pub class: &'static str,
pub style: &'static str,
pub handle: UseStateHandle<String>,
pub valid_handle: UseStateHandle<bool>,
pub validate_function: Callback<String, bool>,
pub data_testid: &'static str,
}yew only.Expand description
Props for the Field Yew component, a convenience wrapper for a
labeled, validated input built on top of input-rs.
Fieldsยง
ยงid: &'static strThe unique id for the <input> element.
name: &'static strThe name attribute for the <input>.
type: &'static strThe input type, e.g. "text", "email", "password".
label: &'static strLabel text displayed above the input.
placeholder: &'static strPlaceholder text shown inside the empty input.
helper_text: &'static strHelper text displayed below the input.
validation_state: ValidationStateValidation state: None, Valid, or Invalid(message).
required: boolWhether the field is required.
disabled: boolWhether the field is disabled.
full_width: boolWhether the field takes the full container width.
variant: VariantVisual variant of the field border.
color: ColorColor theme for focus/label highlights.
size: SizeSize of the field.
pattern: &'static strHTML5 pattern attribute for native regex validation.
maxlength: Option<usize>Maximum number of characters allowed.
minlength: Option<usize>Minimum number of characters required.
class: &'static strAdditional CSS class on the outer <div>.
style: &'static strInline CSS on the outer <div>.
handle: UseStateHandle<String>Controlled value signal.
valid_handle: UseStateHandle<bool>Validity signal.
validate_function: Callback<String, bool>Validation function called with the current value.
data_testid: &'static strdata-testid for automated testing.
Trait Implementationsยง
Sourceยงimpl Clone for FieldProps
impl Clone for FieldProps
Sourceยงimpl PartialEq for FieldProps
impl PartialEq for FieldProps
Sourceยงimpl Properties for FieldProps
impl Properties for FieldProps
impl StructuralPartialEq for FieldProps
Auto Trait Implementationsยง
impl !Freeze for FieldProps
impl !RefUnwindSafe for FieldProps
impl !Send for FieldProps
impl !Sync for FieldProps
impl !UnwindSafe for FieldProps
impl Unpin for FieldProps
impl UnsafeUnpin for FieldProps
Blanket Implementationsยง
impl<Token, Builder, How> AllPropsFor<Builder, How> for Tokenwhere
Builder: Buildable<Token>,
<Builder as Buildable<Token>>::WrappedToken: HasAllProps<<Builder as Buildable<Token>>::Output, How>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> HasAllProps<(), T> for T
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.