howdy/ui/hover_card

Hover cards: a preview that appears beside a link while the pointer rests on it or it has focus, such as a profile behind a name.

html.a([attribute.href("/people/ada"), ..hover_card.trigger("ada-card")], [text("@ada")]),
hover_card.card("ada-card", [], [profile_summary]),

A hover card adds to its link without replacing it: the link still goes where it says, so nothing depends on the card, which touch screens never show. It opens after half a second and stays open while the pointer is over it, so it can hold links of its own. Escape hides it.

Values

pub fn card(
  id: String,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn card_class() -> css.Class
pub fn classes() -> List(css.Class)

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

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

Attributes for the link the card with this id previews.

✨ Search Document