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
Release checklist
Review readiness items before triggering deployment.
last close reason: none
Headless popover with Tailwind shell
Release checklist
Pair the primitive with your own anchored layout utilities.
last close reason: none
Behavior baseline
Enter/Spaceon a button trigger toggles the panel.Escapecloses whencloseOnEscapeis enabled.- Focus can return to the trigger when
restoreFocusis enabled. - No focus trap is applied by default, so
Tabcan move outside the popover.