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_reorderable_list
val list :
( 'source, 'cmp ) Bonsai_web.Bonsai.comparator ->
dnd:( 'source, int ) Bonsai_web_ui_drag_and_drop.t Bonsai_web.Bonsai.Value.t ->
?enable_debug_overlay:bool ->
?extra_item_attrs:Bonsai_web.Vdom.Attr.t Bonsai_web.Bonsai.Value.t ->
?left:Css_gen.Length.t ->
?right:Css_gen.Length.t ->
?empty_list_placeholder:
( item_is_hovered:bool Bonsai_web.Value.t ->
Bonsai_web.Vdom.Node.t Bonsai_web.Computation.t ) ->
?default_item_height:int ->
( 'source, Bonsai_web.Vdom.Node.t * int, 'cmp ) Core.Map.t Bonsai_web.Value.t ->
Bonsai_web.Vdom.Node.t Bonsai_web.Bonsai.Computation.t
A vertical list component which moves items into their proper place during drag and drop. Items use absolute positioning for explicit layout; that is, the nth item is n * item_height
pixels from the top of the container. Items outside the list may be dragged into the list to extend it.
val simple :
( 'key, 'cmp ) Bonsai_web.Bonsai.comparator ->
?sentinel_name:string ->
?enable_debug_overlay:bool ->
?extra_item_attrs:Bonsai_web.Vdom.Attr.t Bonsai_web.Value.t ->
?left:Css_gen.Length.t ->
?right:Css_gen.Length.t ->
?empty_list_placeholder:
( item_is_hovered:bool Bonsai_web.Value.t ->
Bonsai_web.Vdom.Node.t Bonsai_web.Computation.t ) ->
?default_item_height:int ->
render:
( index:int Bonsai_web.Value.t ->
source:Bonsai_web.Vdom.Attr.t Bonsai_web.Value.t ->
'key Bonsai_web.Value.t ->
('data * Bonsai_web.Vdom.Node.t) Bonsai_web.Computation.t ) ->
( 'key, 'cmp ) Core.Set.t Bonsai_web.Value.t ->
(('key * 'data) list * Bonsai_web.Vdom.Node.t) Bonsai_web.Computation.t
Similar to list
, but creates the drag-and-drop universe and handles the on_drop
event, making it fully self-contained.
module Action : sig ... end
val with_inject :
( 'key, 'cmp ) Bonsai_web.Bonsai.comparator ->
?sentinel_name:string ->
?enable_debug_overlay:bool ->
?extra_item_attrs:Bonsai_web.Vdom.Attr.t Bonsai_web.Value.t ->
?left:Css_gen.Length.t ->
?right:Css_gen.Length.t ->
?empty_list_placeholder:
( item_is_hovered:bool Bonsai_web.Value.t ->
Bonsai_web.Vdom.Node.t Bonsai_web.Computation.t ) ->
?default_item_height:int ->
( index:int Bonsai_web.Value.t ->
source:Bonsai_web.Vdom.Attr.t Bonsai_web.Value.t ->
'key Bonsai_web.Value.t ->
('data * Bonsai_web.Vdom.Node.t) Bonsai_web.Computation.t ) ->
(('key * 'data) list
* Bonsai_web.Vdom.Node.t
* ( 'key Action.t ->
unit Bonsai_web.Effect.t ))
Bonsai_web.Computation.t
Similar to simple
, but exposes the components injection function. This is used by the Bonsai_web_ui_form
wrapper of this library.
ON THIS PAGE
No table of contents