Function Input

Source
pub fn Input<T>(props: InputProps<T>) -> impl IntoView
where T: Datatype,
Expand description

A component that renders an input field. It takes a datatype as a type parameter and automatically handles parsing and validation.

§Required Props

§Optional Props

  • placeholder: impl Into<T>
    • The placeholder text of the input field.
  • value: impl Into<MaybeProp<T>>
    • The value of the input field.
  • change: [impl Into<Callback<Result<T, T::Error>, ()>>](Callback<Result<T, T::Error>, ()>)
    • A write signal that is updated with the parsed value of the input field.
  • error: impl Into<MaybeProp<TextProp>>
    • Set a custom error message for the input field.