Module Byo_toplayer

module Position : sig ... end
module Alignment : sig ... end
module Offset : sig ... end
module Restore_focus_on_close : sig ... end
val arrow_helper : attrs:Bonsai_web.Vdom.Attr.t list -> arrow_len:[ `Px_float of float ] -> unit -> Bonsai_web.Vdom.Node.t

A 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.t

Tooltips can be used to provide additional information to a user when they hover over an element.

module Match_anchor_side : sig ... end
val 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.t

vdom_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 ... end
module Close_on_click_outside : sig ... end
module Controls : sig ... end
module Autoclose : sig ... end
module Popover : sig ... end

Popovers are a more powerful version of tooltips:

module Modal : sig ... end