mmo-tooltip
1 symbole · générée le 27 Oct 2026
mmo-tooltip
mmo-tooltip.jhs:1An "i" next to a label that explains it: pointing at it (or focusing it, or tapping it) opens a bubble with the slotted content, above the icon or below it when there is no room, kept inside the window.
- Étend
- CustomShadowElement
Index
| init() | ||
| updateTipIcon() | The icon of the variant (.success, .error, .warning), read at each opening so a class changed later is followed. | |
| showTip(now) | Open the bubble, after a short delay unless now (so a pointer only crossing the icon opens nothing). | |
| hideTip(now) | Close the bubble, after a short grace delay unless now (time for the pointer to reach the bubble). | |
| placeTip() | Put the bubble above the icon, centred on it, or below when the space above is too short; then slide it sideways so it stays 8px inside the window, the arrow still pointing at the icon. | |
| (default) | what the bubble says | |
| .compact | no badge in the bubble, a tighter bubble: for a one-line explanation | |
| .success | set success colors for the tooltip | |
| .error | set error colors for the tooltip | |
| .warning | set warning colors for the tooltip |
Méthodes5
init()
mmo-tooltip.jhs:23updateTipIcon()
mmo-tooltip.jhs:58The icon of the variant (.success, .error, .warning), read at each opening so a class changed later is followed.
showTip(now)
mmo-tooltip.jhs:70Open the bubble, after a short delay unless now (so a pointer only crossing the icon opens nothing).
| now = false |
hideTip(now)
mmo-tooltip.jhs:98Close the bubble, after a short grace delay unless now (time for the pointer to reach the bubble).
| now = false |
placeTip()
mmo-tooltip.jhs:122Put the bubble above the icon, centred on it, or below when the space above is too short; then slide it sideways so it stays 8px inside the window, the arrow still pointing at the icon.
Slots1
(default)
mmo-tooltip.jhswhat the bubble says
<slot>
Points d'accroche CSS4
.compact
mmo-tooltip.jhsno badge in the bubble, a tighter bubble: for a one-line explanation
.compact
.success
mmo-tooltip.jhsset success colors for the tooltip
.success
.error
mmo-tooltip.jhsset error colors for the tooltip
.error
.warning
mmo-tooltip.jhsset warning colors for the tooltip
.warning