Hexpunk
InstallConceptsElementsProsehp-cellhp-codehp-copyhp-hexhp-latexhp-visually-hiddenhp-buttonhp-checkboxhp-formhp-labelhp-radiohp-selecthp-sliderhp-togglehp-toggle-grouphp-badgehp-taghp-progresshp-spinnerhp-backgroundhp-clusterhp-collapsiblehp-demohp-gridhp-scroll-areahp-separatorhp-sidebarhp-toolbarhp-avatarhp-iconhp-pixelhp-linkhp-menubarhp-navigation-menuhp-tabshp-alert-dialoghp-context-menuhp-dialoghp-dropdown-menuhp-hover-cardhp-popoverhp-tooltiphp-bannerhp-toasthp-tetherhp-module-handlehp-unfold-listhp-unfold-overlayhp-unfold-pagehp-bondhp-link-nodePaletteAnimationsReleases

hp-tooltip

Lightweight tooltip — wraps a trigger and shows the slotted content on hover / focus. Auto-stamps aria-describedby on the trigger while open. Positioning is "side relative to trigger" only; for anchored / flipped popovers reach for the forthcoming hp-popover.

Examples API Intent Changelog
top tooltip above right tooltip right bottom tooltip below left tooltip left
<body> <hp-tooltip side="top"> <hp-button>info</hp-button> <span slot="content">More information</span> </hp-tooltip> </body>

Install

bun add @hexpunk/core lit
import "@hexpunk/core";

Properties

Property Attribute Type Default Description
side side HpTooltipSide "top" Tooltip side relative to the trigger.
openDelay open-delay number 300 Delay before showing on hover (ms). Default 300. Reduces flickering when the cursor passes over a trigger.
closeDelay close-delay number 100 Delay before hiding on mouseleave (ms). Default 100.

Slots

Slot Description
(default) Trigger element (first child)
content Tooltip body

CSS Parts

Part Description
tooltip The tooltip body element

Accessibility

role="tooltip" on the content; aria-describedby linking the trigger to the tooltip's id while open. Escape dismisses. Open / close delays are configurable via open-delay / close-delay attributes (default 300 / 100 ms).

No per-component entries in CHANGELOG.md yet.

esc