Struct Props

Source
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>,
}
Available on crate feature 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 Clone for Props

Sourceยง

fn clone(&self) -> Props

Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Sourceยง

impl PartialEq for Props

Sourceยง

fn eq(&self, other: &Props) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Sourceยง

impl Properties for Props

Sourceยง

type Builder = PropsBuilder

Builder that will be used to construct properties
Sourceยง

fn builder() -> Self::Builder

Entrypoint for building properties
Sourceยง

impl StructuralPartialEq for Props

Auto Trait Implementationsยง

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> CloneToUninit for T
where T: Clone,

Sourceยง

unsafe fn clone_to_uninit(&self, dest: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Sourceยง

impl<T> DynClone for T
where T: Clone,

Sourceยง

fn __clone_box(&self, _: Private) -> *mut ()

Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T> InitializeFromFunction<T> for T

Sourceยง

fn initialize_from_function(f: fn() -> T) -> T

Create an instance of this type from an initialization function
Sourceยง

impl<T> Instrument for T

Sourceยง

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Sourceยง

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> IntoEither for T

Sourceยง

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Sourceยง

impl<T> IntoPropValue<Option<T>> for T

Sourceยง

fn into_prop_value(self) -> Option<T>

Convert self to a value of a Properties struct.
Sourceยง

impl<T> IntoPropValue<T> for T

Sourceยง

fn into_prop_value(self) -> T

Convert self to a value of a Properties struct.
Sourceยง

impl<T> Same for T

Sourceยง

type Output = T

Should always be Self
Sourceยง

impl<Ret> SpawnIfAsync<(), Ret> for Ret

Sourceยง

fn spawn(self) -> Ret

Spawn the value into the dioxus runtime if it is an async block
Sourceยง

impl<T> StorageAccess<T> for T

Sourceยง

fn as_borrowed(&self) -> &T

Borrows the value.
Sourceยง

fn into_taken(self) -> T

Takes the value.
Sourceยง

impl<T, O> SuperFrom<T> for O
where O: From<T>,

Sourceยง

fn super_from(input: T) -> O

Convert from a type to another type.
Sourceยง

impl<T, O, M> SuperInto<O, M> for T
where O: SuperFrom<T, M>,

Sourceยง

fn super_into(self) -> O

Convert from a type to another type.
Sourceยง

impl<T> ToOwned for T
where T: Clone,

Sourceยง

type Owned = T

The resulting type after obtaining ownership.
Sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Sourceยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Sourceยง

fn vzip(self) -> V

Sourceยง

impl<T> WithSubscriber for T

Sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

impl<Token, Builder, How> AllPropsFor<Builder, How> for Token
where Builder: Buildable<Token>, <Builder as Buildable<Token>>::WrappedToken: HasAllProps<<Builder as Buildable<Token>>::Output, How>,

Sourceยง

impl<T> DependencyElement for T
where T: 'static + PartialEq + Clone,

Sourceยง

impl<T> ErasedDestructor for T
where T: 'static,

Sourceยง

impl<T> HasAllProps<(), T> for T

Sourceยง

impl<T> MaybeSendSync for T