Getting StartedInstall and bootstrap headless foundations 4
LayoutHeadless structural primitives for expandable and container patterns 6
OverlayHeadless modal and floating layer behavior 3
FeedbackHeadless notification and status communication patterns 5
FormHeadless input and selection contracts 17
UtilityReusable action, identity, and clipboard behavior 6
NavigationHeadless trails, trees, menus, and command surfaces 7

Tooltip overview

Headless tooltip gives you hover and focus helper-text behavior with primitive-owned anchoring, positioning, and ARIA wiring while leaving the trigger and floating shell fully up to you.

Imports

Bring in the root plus the two slot directives when you want full ownership of the markup.

Headless tooltip imports

ts
import {
  TngTooltip,
  TngTooltipContent,
  TngTooltipTrigger,
} from '@tailng-ui/primitives';

Basic composition

The root manages delays and floating placement. Trigger and content stay semantic and owner-authored.

Headless tooltip composition

html
<span tngTooltip side="top" [openDelay]="120" [closeDelay]="60">
  <button type="button" tngTooltipTrigger>Hover for hint</button>
  <span tngTooltipContent id="country-filter-tip">
    Use this to filter countries quickly.
  </span>
</span>

Style variants

The same headless tooltip behavior skinned with owner-authored CSS or Tailwind utilities.

Headless tooltip with owner CSS

open: false

Behavior baseline

  • mouseenter and keyboard focus open the root-managed tooltip.
  • mouseleave, blur, outside pointer, and Escape close the tooltip.
  • Positioning is computed in JavaScript with side flipping and viewport collision handling.
  • Tooltip content stays non-interactive and should remain outside the tab order.