<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.
<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
| Attribute | Type | Default | Description |
|---|---|---|---|
placement | string | top | top, bottom, left, or right of the trigger. |
trigger | string | hover | Inherited from popover; a tooltip defaults to hover. |
label | string | — | Text tip, as an alternative to the default slot. |
expose | boolean | false | Inherited 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
| Slot | Description |
|---|---|
trigger | The element that reveals the tip on hover/focus. |
| default | The tip content. |
Theming
Inherits the popover's custom properties:
:root {
--popover-bg: var(--card);
--popover-radius: 0.5rem;
}