GitHub

tooltip

CSS-powered tooltip that wraps any element. No JavaScript required — the bubble appears on hover and :focus-within. Supports four placements.

tooltip({
  content:  'This appears on top',
  position: 'top',       // top | bottom | left | right
  trigger:  button({ label: 'Hover me', variant: 'secondary' }),
})
PropTypeDefault
contentstringTooltip text (plain text only)
triggerstring (HTML)Raw HTML slot — the element the tooltip wraps
positiontop | bottom | left | righttop
classstring