Function freya::prelude::Input

source ·
pub fn Input(_: InputProps) -> Result<VNode, RenderError>
Expand description

Small box to edit text.

§Styling

Inherits the InputTheme theme.

§Example

fn app() -> Element {
    let mut value = use_signal(String::new);

    rsx!(
        label {
            "Value: {value}"
        }
        Input {
            value: value.read().clone(),
            onchange: move |e| {
                 value.set(e)
            }
        }
    )
}