bonsai
A library for building dynamic webapps, using Js_of_ocaml
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
package bonsai
-
bonsai
-
-
bonsai.bench
-
bonsai.example_chat_open_source_native
-
bonsai.example_chat_open_source_native_common
-
-
bonsai.extra
-
-
bonsai.focus_ring
-
bonsai.protocol
-
bonsai.tailwind_colors
-
bonsai.test
-
bonsai.test.dot
-
bonsai.web_test
-
bonsai.web_ui_common_components
-
bonsai.web_ui_drag_and_drop
-
bonsai.web_ui_element_size_hooks
-
bonsai.web_ui_file
-
bonsai.web_ui_file_from_web_file
-
bonsai.web_ui_form
-
-
bonsai.web_ui_freeform_multiselect
-
bonsai.web_ui_multi_select
-
-
bonsai.web_ui_query_box
-
bonsai.web_ui_reorderable_list
-
bonsai.web_ui_typeahead
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Library bonsai.web_ui_form
Creates a "submit" handler, which is intended to be used by the view_as_vdom
function.
handle_enter
: when true, will render the form inside of a <form> element, which gives us the ability to add an "on_submit" handler which detecs people hitting "enter" when a form element is focused. The default istrue
. Set it tofalse
to disable this behavior.button
: When Some, will append a button with the label given by its contents. will be added to the end of the form. If the form is currently invalid, the button will be disabled. The default isSome "Submit"
. Explicitly set it toNone
to remove the button entirely.f
: the function which is run when the form is submitted.
val create :
?handle_enter:bool ->
?button:string option ->
f:( 'a -> unit Ui_effect.t ) ->
unit ->
'a t
ON THIS PAGE
No table of contents