AppTooltip
A floating label that adds context while an element is hovered or focused. The tip is placed on <body> from the trigger box, so it sizes to its own text (up to 20rem), is never clipped by an overflow-hidden card or table, flips to the other side when there is no room and stays 8px inside the viewport, with its nub still pointing at the trigger. The bubble and the nub are one AppBlob: the nub grows out of the side facing the trigger and fuses with the bubble; the light tip has an edge instead of a shadow. aria-describedby goes on the control inside (the button or link), Escape closes it, and the pointer can move onto the tip without it closing (WCAG 1.4.13). One tip shows at a time.
Install: pnpm add-component AppTooltip
Placements
The tooltip can be positioned on any side of the element.
Rich triggers
Wrap any element like buttons, icons, or links.
Tooltip group
Rest on one button until its tip opens, then slide along the row: each neighbour opens at once. 300ms after the last one closes the group is cold again, so the delay is back. Every AppTooltip on the page belongs to the one group.
Custom delays
Control how quickly the tooltip appears or disappears.
Light theme
Use the light theme for better contrast on dark backgrounds.
API
content(string): The text to show in the tooltip.placement('top' | 'bottom' | 'start' | 'end'): Preferred side; start and end follow the writing direction. It flips when that side has no room.delay(number): Delay in ms before a cold tooltip shows.skipDelay(number): The tooltip group: while any AppTooltip is open, and for this many ms after one closes, the next opens at once instead of waiting out its delay. 0 opts out.disableOnMobile(boolean): Whether to hide tooltips on touch devices.dark(boolean): Whether to use the dark theme variant.