pub fn Input<T>(props: InputProps<T>) -> impl IntoViewwhere
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
- label:
impl Into<TextProp>- The label of the input field.
- bind:
impl Into<QueryString>- The query string that binds the input field to the form data.
§Optional Props
- placeholder:
impl Into<T>- The placeholder text of the input field.
- debug_value:
impl Into<T>- A debug value that is used to autofill the input field in debug mode.
- value:
impl Into<MaybeProp<T>>- The initial value of the input field.
- sync:
impl Into<WriteSignal<T>>- 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.