pub struct UseEuvInput;Expand description
Input functionality for handling form input events.
Provides methods for creating toggle handlers, input value handlers, and focus/blur event handlers.
Implementations§
Source§impl UseEuvInput
Implementation of input functionality.
impl UseEuvInput
Implementation of input functionality.
Sourcepub fn use_toggle(signal: Signal<bool>) -> Option<Rc<dyn Fn(Event)>>
pub fn use_toggle(signal: Signal<bool>) -> Option<Rc<dyn Fn(Event)>>
Creates a click event handler that toggles a boolean signal.
Produces a NativeEventHandler that flips the value of the given
boolean signal on each click. Useful for toggle buttons, visibility
switches, and drawer open/close patterns.
§Arguments
Signal<bool>- The boolean signal to toggle.
§Returns
Option<Rc<dyn Fn(Event)>>- A click event handler that toggles the signal.
Sourcepub fn on_focus_scroll_into_view() -> Option<Rc<dyn Fn(Event)>>
pub fn on_focus_scroll_into_view() -> Option<Rc<dyn Fn(Event)>>
Creates a focus handler that scrolls the focused input into the visible area between the safe top and the soft keyboard.
Reads --euv-keyboard-height (set by the native host /
IMMERSIVE_SAFE_AREA_SCRIPT page bridge) and the visual viewport.
If the input’s bottom edge falls under
viewport_bottom - keyboard_height - FOCUS_GAP_PX, the page is
scrolled by the difference. A small inline padding-bottom is also
added to <main> (when one exists) so the document gains enough
scrollable space for the adjustment — the inline style is cleared
by Self::on_blur_restore_height.
Sourcepub fn on_blur_restore_height() -> Option<Rc<dyn Fn(Event)>>
pub fn on_blur_restore_height() -> Option<Rc<dyn Fn(Event)>>
Blur handler that strips the inline padding-bottom injected by
Self::on_focus_scroll_into_view so the page returns to its
native layout once the keyboard closes.
Trait Implementations§
Source§impl Clone for UseEuvInput
impl Clone for UseEuvInput
Source§fn clone(&self) -> UseEuvInput
fn clone(&self) -> UseEuvInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more