package incr_dom_interactive
A monad for composing chains of interactive UI elements
Install
Dune Dependency
Authors
Maintainers
Sources
incr_dom_interactive-v0.14.0.tar.gz
sha256=7bcac67fb2e670bb087c30729973430f1b18b2c898cf87ff8b6f466f7dc328e4
md5=0307253bd42dd3de1ecd9fc773784a6d
Description
This library allows your program to receive input from the user using DOM elements such as checkboxes, text fields, and buttons. It allows you to inspect the user's input and decide afterwards what the rest of the [Interactive.t] should be. This library is intended to be used in conjunction with Incr_dom.
Published: 31 May 2020
README
Incr_dom_interactive
A monad for composing chains of interactive UI elements inside an Incr_dom
application.
let open Interactive.Let_syntax in
let open Interactive.Primitives in
let submit_button = button ~text:"Submit" () in
let%bind_open user_input = text () in
if String.length user_input < 10
then
let%map_open () = message "Please enter at least 10 characters." in
None
else
match%map submit_button with
| Not_pressed -> None
| Pressed -> Some user_input
Dependencies (13)
- js_of_ocaml-ppx
-
js_of_ocaml
>= "3.4.1"
-
dune
>= "2.0.0"
-
virtual_dom
>= "v0.14" & < "v0.15"
-
splay_tree
>= "v0.14" & < "v0.15"
-
ppx_jane
>= "v0.14" & < "v0.15"
-
incremental
>= "v0.14" & < "v0.15"
-
incr_select
>= "v0.14" & < "v0.15"
-
incr_map
>= "v0.14" & < "v0.15"
-
incr_dom
>= "v0.14" & < "v0.15"
-
async_kernel
>= "v0.14" & < "v0.15"
-
async_js
>= "v0.14" & < "v0.15"
-
ocaml
>= "4.08.0"
Dev Dependencies
None
Used by (1)
-
incr_dom_sexp_form
< "v0.15.0"
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page