<wmcp-tooltip>

A hover/focus tooltip. It's a thin preset of <wmcp-popover> — the same anchored-panel machinery, defaulted to trigger="hover", so it gets role="tooltip" and aria-describedby and opens on hover and keyboard focus. Put the trigger in the trigger slot and the tip text in the default slot.

Copy to clipboard
<wmcp-tooltip>
  <button slot="trigger" aria-label="Copy"></button>
  Copy to clipboard
</wmcp-tooltip>

Because it opens on focus (not just hover), keyboard and screen-reader users get the tip too — the trigger references the panel via aria-describedby.

Element attributes

AttributeTypeDefaultDescription
placementstringtoptop, bottom, left, or right of the trigger.
triggerstringhoverInherited from popover; a tooltip defaults to hover.
labelstringText tip, as an alternative to the default slot.
exposebooleanfalseInherited from <wmcp-popover>; rarely needed for a tooltip.

A tooltip is primarily a presentational affordance — an agent has no meaningful reason to "open" one. It inherits popover's exposure surface for completeness, but you'll usually leave expose off. For agent-triggered content, reach for <wmcp-popover> instead.

Slots

SlotDescription
triggerThe element that reveals the tip on hover/focus.
defaultThe tip content.

Theming

Inherits the popover's custom properties:

:root {
  --popover-bg: var(--card);
  --popover-radius: 0.5rem;
}