Byo_toplayermodule Position : sig ... endmodule Alignment : sig ... endmodule Offset : sig ... endmodule Restore_focus_on_close : sig ... endval arrow_helper :
attrs:Bonsai_web.Vdom.Attr.t list ->
arrow_len:[ `Px_float of float ] ->
unit ->
Bonsai_web.Vdom.Node.tA utility for creating tooltip/popover arrows. You probably want the same colors for the arrow and the tooltip / popover. attrs should not include padding or size, since this is calculated from arrow_len. It also should not include positioning, because that's set by toplayer.
val tooltip :
?tooltip_attrs:Bonsai_web.Vdom.Attr.t list ->
?position:Position.t ->
?alignment:Alignment.t ->
?offset:Offset.t ->
?show_delay:Core.Time_ns.Span.t ->
?hide_grace_period:Core.Time_ns.Span.t ->
?hoverable_inside:bool ->
?light_dismiss:bool ->
?arrow:Bonsai_web.Vdom.Node.t ->
Bonsai_web.Vdom.Node.t ->
Bonsai_web.Vdom.Attr.tTooltips can be used to provide additional information to a user when they hover over an element.
module Match_anchor_side : sig ... endval vdom_popover :
?popover_attrs:Bonsai_web.Vdom.Attr.t list ->
?position:Position.t ->
?alignment:Alignment.t ->
?offset:Offset.t ->
?match_anchor_side_length:Match_anchor_side.t ->
?restore_focus_on_close:Restore_focus_on_close.t ->
?overflow_auto_wrapper:bool ->
?arrow:Bonsai_web.Vdom.Node.t ->
Bonsai_web.Vdom.Node.t ->
Bonsai_web.Vdom.Attr.tvdom_popover returns an attr which, when attached to a Vdom node, will create a popover positioned relative to that node.
The popover's visibility MUST be controlled by attaching / detaching the attr to/from the anchor; the browser-level `showPopover()` and `hidePopover()` functions MUST NOT be used.
Prefer using the Bonsai stateful Popover.* functions when possible, since that correctly handles closing on clicks outside, emitting lifecycle events on open/close, etc.
module Anchor : sig ... endmodule Close_on_click_outside : sig ... endmodule Controls : sig ... endmodule Autoclose : sig ... endmodule Popover : sig ... endPopovers are a more powerful version of tooltips:
module Modal : sig ... endmodule Private_for_bonsai_web_ui_toplayer : sig ... end