pub fn Form(props: FormProps) -> ElementExpand description
A form component wrapper
This component provides a styled container for form items with consistent layout and validation state management.
§Example
ⓘ
use dioxus_element_plug::components::form::Form;
use dioxus_element_plug::components::form_item::FormItem;
use dioxus_element_plug::components::input::{Input, InputType};
rsx! {
Form {
layout: "horizontal".to_string(),
label_position: "right".to_string(),
on_submit: move |_| println!("Form submitted"),
FormItem {
label: "Name",
Input {
input_type: InputType::Text,
placeholder: "Enter your name",
}
}
}
}