lustre/event

To read the full documentation for this module, please visit https://pkg.hayleigh.dev/lustre/api/lustre/event

Functions

pub fn checked(event: Dynamic) -> Result(Bool, List(DecodeError))
pub fn mouse_position(event: Dynamic) -> Result(
  #(Float, Float),
  List(DecodeError),
)
pub fn on(name: String, handler: fn(Dynamic) -> Result(a, b)) -> Attribute(
  a,
)
pub fn on_blur(msg: a) -> Attribute(a)
pub fn on_check(msg: fn(Bool) -> a) -> Attribute(a)
pub fn on_click(msg: a) -> Attribute(a)
pub fn on_focus(msg: a) -> Attribute(a)
pub fn on_input(msg: fn(String) -> a) -> Attribute(a)
pub fn on_keydown(msg: fn(String) -> a) -> Attribute(a)

Listens for key dow events on an element, and dispatches a message with the current key being pressed.

pub fn on_keypress(msg: fn(String) -> a) -> Attribute(a)

Listens for key presses on an element, and dispatches a message with the current key being pressed.

pub fn on_keyup(msg: fn(String) -> a) -> Attribute(a)

Listens for key up events on an element, and dispatches a message with the current key being released.

pub fn on_mouse_down(msg: a) -> Attribute(a)
pub fn on_mouse_enter(msg: a) -> Attribute(a)
pub fn on_mouse_leave(msg: a) -> Attribute(a)
pub fn on_mouse_out(msg: a) -> Attribute(a)
pub fn on_mouse_over(msg: a) -> Attribute(a)
pub fn on_mouse_up(msg: a) -> Attribute(a)
pub fn on_submit(msg: a) -> Attribute(a)
pub fn value(event: Dynamic) -> Result(String, List(DecodeError))
Search Document