howdy/ui/popover

Popovers: a panel anchored to the button that opens it.

ui.button(Outline, popover.trigger("filters"), [text("Filters")]),
popover.popover("filters", [], [filter_form]),

A popover opens below its trigger, or above when there is no room. The browser closes it on Escape or a click outside, and it sits above everything else on the page. The trigger and the popover are tied by id, so both must be in the page or both in one live view. A live view hears one open or close with event.on("toggle", ...).

Values

pub fn classes() -> List(css.Class)

Every class this module uses, for howdy/ui/export.

pub fn close(id: String) -> List(attribute.Attribute(msg))

Attributes for a button inside the popover that closes it.

pub fn popover(
  id: String,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn popover_class() -> css.Class
pub fn trigger(id: String) -> List(attribute.Attribute(msg))

Attributes for the button that opens and closes the popover with this id.

✨ Search Document