Popover overview
Popover provides a detached anchored panel that any linked button can open, with collision-aware positioning, outside-pointer dismissal, Escape handling, and optional focus restore. For full DOM ownership, use the separate headless popover docs.
Imports
Use the wrapper when your team wants a styled floating panel linked to a native or TailNG trigger.
Wrapper imports
ts
import { TngPopoverComponent, TngPopoverTriggerFor, type TngPopoverCloseReason } from '@tailng-ui/components';
Usage patterns
Wrapper usage
html
<tng-popover
#popover="tngPopoverComponent"
[open]="open()"
(openChange)="open.set($event)"
(closed)="onClosed($event)"
>
<p>Wrapper popover body content.</p>
</tng-popover>
<button type="button" [tngPopoverTriggerFor]="popover">Project actions</button>
Style variants
The wrapper behavior shown with local CSS or Tailwind-flavored projected content.
Wrapper popover (plain CSS)
Use the detached panel with TailNG trigger wiring and dismissal behavior.
last close reason: none
Wrapper popover (tailwind shell)
Combine wrapper behavior with utility classes in projected content.
last close reason: none
Keyboard baseline
Enter/Spaceon the linked button toggles the panel.Escapecloses whencloseOnEscapeis enabled.- No focus trap is applied by default;
Tabcan move outside the panel. - Focus can return to the trigger when
restoreFocusis enabled.