Html.Events

HTML & web

Event attributes for shared TEA views. On the BEAM they are inert (false attrs) so SSR markup stays static; the JS client attaches real listeners on hydrate. Prefer these names so one view compiles for both targets.

Values

onClick

onClick : msg -> Attribute msg

Click handler (inert on SSR).

Examples

onClick Clicked

onDoubleClick

onDoubleClick : msg -> Attribute msg

Double-click handler (inert on SSR).

Examples

onDoubleClick Opened

onMouseDown

onMouseDown : msg -> Attribute msg

Mouse-down handler (inert on SSR).

Examples

onMouseDown Pressed

onMouseUp

onMouseUp : msg -> Attribute msg

Mouse-up handler (inert on SSR).

Examples

onMouseUp Released

onMouseEnter

onMouseEnter : msg -> Attribute msg

Mouse-enter handler (inert on SSR).

Examples

onMouseEnter Entered

onMouseLeave

onMouseLeave : msg -> Attribute msg

Mouse-leave handler (inert on SSR).

Examples

onMouseLeave Left

onMouseOver

onMouseOver : msg -> Attribute msg

Mouse-over handler (inert on SSR).

Examples

onMouseOver Hovered

onMouseOut

onMouseOut : msg -> Attribute msg

Mouse-out handler (inert on SSR).

Examples

onMouseOut Unhovered

onSubmit

onSubmit : msg -> Attribute msg

Form submit handler (inert on SSR).

Examples

onSubmit Submitted

onBlur

onBlur : msg -> Attribute msg

Blur handler (inert on SSR).

Examples

onBlur Blurred

onFocus

onFocus : msg -> Attribute msg

Focus handler (inert on SSR).

Examples

onFocus Focused

onCheck

onCheck : msg -> Attribute msg

Checkbox change handler (inert on SSR).

Examples

onCheck Toggled

onInput

onInput : (String -> msg) -> Attribute msg

Input handler (inert on SSR).

Examples

onInput Changed