package alba

  1. Overview
  2. Docs
type 'msg t =
  1. | Style of string * string
  2. | Attribute of string * string
  3. | Property of string * encoder
  4. | On of string * 'msg decoder
val style : string -> string -> 'msg t
val attribute : string -> string -> 'msg t
val property : string -> encoder -> 'msg t
val on : string -> 'msg decoder -> 'msg t
val string_property : string -> string -> 'msg t

string_property name value

val bool_property : string -> bool -> 'msg t

bool_property name value

val placeholder : string -> 'msg t
val value : string -> 'msg t

Value property. Used in input elements like 'input', 'textarea'.

val checked : bool -> 'msg t

Indicate, if a checkbox is checked.

val type_ : string -> 'msg t

Set the type attribute of an input element. Legal values "text" (default), "password", "checkbox", "radio", "color", "button", "file" etc.

val class_ : string -> 'msg t

Set the class attribute of the element.

val onClick : 'msg -> 'msg t
val onDoubleClick : 'msg -> 'msg t
val onMouseDown : 'msg -> 'msg t
val onMouseUp : 'msg -> 'msg t
val onMouseEnter : 'msg -> 'msg t
val onMouseLeave : 'msg -> 'msg t
val onMouseOver : 'msg -> 'msg t
val onMouseOut : 'msg -> 'msg t
val onKeyDown : (string -> 'msg) -> 'msg t
val onKeyUp : (string -> 'msg) -> 'msg t
val onInput : (string -> 'msg) -> 'msg t

React on input of an input element like 'input', 'textarea', etc.

val onCheck : (bool -> 'msg) -> 'msg t

React on a checkbox click.