euv_ui/component/input/view/struct.rs
1use crate::*;
2
3/// Props for the `euv_input` component.
4///
5/// Defines the strongly-typed interface for the labeled input field.
6#[derive(Clone, CustomDebug, Default)]
7pub struct EuvInputProps {
8 /// The unique identifier for the input element.
9 pub id: &'static str,
10 /// The HTML name attribute for the input element.
11 pub name: &'static str,
12 /// The label text displayed above the input. Empty string means no label.
13 pub label: &'static str,
14 /// The HTML input type (e.g. "text", "email", "password", "number").
15 pub input_type: &'static str,
16 /// The placeholder text shown when the input is empty.
17 pub placeholder: &'static str,
18 /// The current input value (reactive Signal).
19 pub value: Signal<String>,
20 /// The autocomplete hint for the browser.
21 pub autocomplete: &'static str,
22 /// Optional input event handler. Defaults to `on_input_value(value)` if None.
23 #[debug(skip)]
24 pub oninput: Option<Rc<dyn Fn(Event)>>,
25 /// Optional custom CSS class. Defaults to `c_euv_input()` if empty.
26 pub class: Css,
27}