package bonsai

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
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.

OCaml

Innovation. Community. Security.