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

Popover overview

Headless popover gives you anchored floating behavior, trigger wiring, outside dismissal, and focus restore without imposing a trigger or panel design.

Imports

Bring in only the root, trigger, panel, and close directives you actually render.

Headless popover imports

ts
import {
  TngPopover,
  TngPopoverClose,
  TngPopoverPanel,
  TngPopoverTrigger,
} from '@tailng-ui/primitives';

Basic composition

The primitive handles open state and dismissal; owners still position and style the anchored panel.

Headless popover composition

html
<section tngPopover #reviewPopover="tngPopover" class="review-anchor">
  <button type="button" [tngPopoverTrigger]="reviewPopover">Project actions</button>

  <section tngPopoverPanel>
    <p>Popover body content.</p>
    <button type="button" tngPopoverClose [tngPopoverClose]="'programmatic'">Close</button>
  </section>
</section>

Style variants

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

Headless popover with owner CSS

last close reason: none

Behavior baseline

  • Enter/Space on a button trigger toggles the panel.
  • Escape closes when closeOnEscape is enabled.
  • Focus can return to the trigger when restoreFocus is enabled.
  • No focus trap is applied by default, so Tab can move outside the popover.