Expand description
HoverCard — the richer sibling of crate::tooltip::Tooltip: a card
that opens on hover and can itself be hovered, for a preview the pointer
can travel into (a profile, a link target, a definition).
It is mounted through hoverable_tooltip, not tooltip — that one word is
the whole difference between a tooltip and a hover card, and it means there
is no open/close state machine to write here: gpui already owns the delay
(500ms by default, .tooltip_show_delay(..) to change it) and keeps the
card alive while the pointer is inside it.
ⓘ
use ui::hover_card::HoverCard;
div()
.id("clearloop")
.hoverable_tooltip(|window, cx| {
HoverCard::summary("clearloop", "Builds desktop software in Rust.", window, cx)
})
.child("@clearloop")