Anatomy
aegov-popover wraps a trigger element (its default slot) and, while open, renders its popover-content slot into a portal at document.body — positioned next to the trigger with a small directional arrow, so it can escape any clipping or stacking context on the page.

| Item | Name | Description |
|---|---|---|
1 |
Trigger | The default-slot element the user clicks or hovers |
2 |
Panel | The portalled role="dialog" container holding popover-content |
3 |
Arrow | Points back at the trigger; repositions itself as the panel moves |
Basic popover
Place a trigger in the default slot and the panel content in the popover-content slot. By default the popover opens on click, traps focus while open, and closes on Escape, an outside click, or when the trigger scrolls out of view.
Service shortcuts
<aegov-popover position="bottom" align="center">
<aegov-button variant="secondary">Quick actions</aegov-button>
<div slot="popover-content">
<h3 class="text-base font-semibold mb-2">Service shortcuts</h3>
<ul class="space-y-1 text-sm">
<li><a href="#" class="text-primary-600 hover:underline">Renew Emirates ID</a></li>
<li><a href="#" class="text-primary-600 hover:underline">Pay traffic fines</a></li>
<li><a href="#" class="text-primary-600 hover:underline">Track application</a></li>
</ul>
</div>
</aegov-popover>
import { AegovPopover, AegovButton } from '@aegov/designsystem-react';
export default function PopoverBasics() {
return (
<AegovPopover position="bottom" align="center">
<AegovButton variant="secondary">Quick actions</AegovButton>
<div slot="popover-content">
<h3 className="text-base font-semibold mb-2">Service shortcuts</h3>
<ul className="space-y-1 text-sm">
<li><a href="#" className="text-primary-600 hover:underline">Renew Emirates ID</a></li>
<li><a href="#" className="text-primary-600 hover:underline">Pay traffic fines</a></li>
<li><a href="#" className="text-primary-600 hover:underline">Track application</a></li>
</ul>
</div>
</AegovPopover>
);
}
<template>
<aegov-popover position="bottom" align="center">
<aegov-button variant="secondary">Quick actions</aegov-button>
<div slot="popover-content">
<h3 class="text-base font-semibold mb-2">Service shortcuts</h3>
<ul class="space-y-1 text-sm">
<li><a href="#" class="text-primary-600 hover:underline">Renew Emirates ID</a></li>
<li><a href="#" class="text-primary-600 hover:underline">Pay traffic fines</a></li>
<li><a href="#" class="text-primary-600 hover:underline">Track application</a></li>
</ul>
</div>
</aegov-popover>
</template>
import { Component } from '@angular/core';
import { AegovPopover, AegovButton } from '@aegov/designsystem-angular';
@Component({
selector: 'app-popover-basics',
imports: [AegovPopover, AegovButton],
template: `
<aegov-popover position="bottom" align="center">
<aegov-button variant="secondary">Quick actions</aegov-button>
<div slot="popover-content">
<h3 class="text-base font-semibold mb-2">Service shortcuts</h3>
<ul class="space-y-1 text-sm">
<li><a href="#" class="text-primary-600 hover:underline">Renew Emirates ID</a></li>
<li><a href="#" class="text-primary-600 hover:underline">Pay traffic fines</a></li>
<li><a href="#" class="text-primary-600 hover:underline">Track application</a></li>
</ul>
</div>
</aegov-popover>
`,
})
export class PopoverBasicsComponent {}
Position
position sets which side of the trigger the popover prefers. If there isn't enough room on that side, the popover automatically flips to the opposite side to stay inside the viewport.
<aegov-popover position="top">
<aegov-button variant="secondary">Top</aegov-button>
<div slot="popover-content">Popover content above the trigger.</div>
</aegov-popover>
<aegov-popover position="right">
<aegov-button variant="secondary">Right</aegov-button>
<div slot="popover-content">Popover content to the right.</div>
</aegov-popover>
<aegov-popover position="bottom">
<aegov-button variant="secondary">Bottom</aegov-button>
<div slot="popover-content">Popover content below the trigger.</div>
</aegov-popover>
<aegov-popover position="left">
<aegov-button variant="secondary">Left</aegov-button>
<div slot="popover-content">Popover content to the left.</div>
</aegov-popover>
import { AegovPopover, AegovButton } from '@aegov/designsystem-react';
export default function PopoverPosition() {
return (
<>
<AegovPopover position="top">
<AegovButton variant="secondary">Top</AegovButton>
<div slot="popover-content">Popover content above the trigger.</div>
</AegovPopover>
<AegovPopover position="right">
<AegovButton variant="secondary">Right</AegovButton>
<div slot="popover-content">Popover content to the right.</div>
</AegovPopover>
<AegovPopover position="bottom">
<AegovButton variant="secondary">Bottom</AegovButton>
<div slot="popover-content">Popover content below the trigger.</div>
</AegovPopover>
<AegovPopover position="left">
<AegovButton variant="secondary">Left</AegovButton>
<div slot="popover-content">Popover content to the left.</div>
</AegovPopover>
</>
);
}
<template>
<aegov-popover position="top">
<aegov-button variant="secondary">Top</aegov-button>
<div slot="popover-content">Popover content above the trigger.</div>
</aegov-popover>
<aegov-popover position="right">
<aegov-button variant="secondary">Right</aegov-button>
<div slot="popover-content">Popover content to the right.</div>
</aegov-popover>
<aegov-popover position="bottom">
<aegov-button variant="secondary">Bottom</aegov-button>
<div slot="popover-content">Popover content below the trigger.</div>
</aegov-popover>
<aegov-popover position="left">
<aegov-button variant="secondary">Left</aegov-button>
<div slot="popover-content">Popover content to the left.</div>
</aegov-popover>
</template>
import { Component } from '@angular/core';
import { AegovPopover, AegovButton } from '@aegov/designsystem-angular';
@Component({
selector: 'app-popover-position',
imports: [AegovPopover, AegovButton],
template: `
<aegov-popover position="top">
<aegov-button variant="secondary">Top</aegov-button>
<div slot="popover-content">Popover content above the trigger.</div>
</aegov-popover>
<aegov-popover position="right">
<aegov-button variant="secondary">Right</aegov-button>
<div slot="popover-content">Popover content to the right.</div>
</aegov-popover>
<aegov-popover position="bottom">
<aegov-button variant="secondary">Bottom</aegov-button>
<div slot="popover-content">Popover content below the trigger.</div>
</aegov-popover>
<aegov-popover position="left">
<aegov-button variant="secondary">Left</aegov-button>
<div slot="popover-content">Popover content to the left.</div>
</aegov-popover>
`,
})
export class PopoverPositionComponent {}
Alignment
align shifts the popover along its cross-axis relative to the trigger. For a bottom-positioned popover this is horizontal alignment; for a left/right-positioned popover it's vertical.
<aegov-popover position="bottom" align="start">
<aegov-button variant="secondary">Start</aegov-button>
<div slot="popover-content">Anchored to the start edge of the trigger.</div>
</aegov-popover>
<aegov-popover position="bottom" align="center">
<aegov-button variant="secondary">Centre</aegov-button>
<div slot="popover-content">Centred on the trigger.</div>
</aegov-popover>
<aegov-popover position="bottom" align="end">
<aegov-button variant="secondary">End</aegov-button>
<div slot="popover-content">Anchored to the end edge of the trigger.</div>
</aegov-popover>
import { AegovPopover, AegovButton } from '@aegov/designsystem-react';
export default function PopoverAlignment() {
return (
<>
<AegovPopover position="bottom" align="start">
<AegovButton variant="secondary">Start</AegovButton>
<div slot="popover-content">Anchored to the start edge of the trigger.</div>
</AegovPopover>
<AegovPopover position="bottom" align="center">
<AegovButton variant="secondary">Centre</AegovButton>
<div slot="popover-content">Centred on the trigger.</div>
</AegovPopover>
<AegovPopover position="bottom" align="end">
<AegovButton variant="secondary">End</AegovButton>
<div slot="popover-content">Anchored to the end edge of the trigger.</div>
</AegovPopover>
</>
);
}
<template>
<aegov-popover position="bottom" align="start">
<aegov-button variant="secondary">Start</aegov-button>
<div slot="popover-content">Anchored to the start edge of the trigger.</div>
</aegov-popover>
<aegov-popover position="bottom" align="center">
<aegov-button variant="secondary">Centre</aegov-button>
<div slot="popover-content">Centred on the trigger.</div>
</aegov-popover>
<aegov-popover position="bottom" align="end">
<aegov-button variant="secondary">End</aegov-button>
<div slot="popover-content">Anchored to the end edge of the trigger.</div>
</aegov-popover>
</template>
import { Component } from '@angular/core';
import { AegovPopover, AegovButton } from '@aegov/designsystem-angular';
@Component({
selector: 'app-popover-alignment',
imports: [AegovPopover, AegovButton],
template: `
<aegov-popover position="bottom" align="start">
<aegov-button variant="secondary">Start</aegov-button>
<div slot="popover-content">Anchored to the start edge of the trigger.</div>
</aegov-popover>
<aegov-popover position="bottom" align="center">
<aegov-button variant="secondary">Centre</aegov-button>
<div slot="popover-content">Centred on the trigger.</div>
</aegov-popover>
<aegov-popover position="bottom" align="end">
<aegov-button variant="secondary">End</aegov-button>
<div slot="popover-content">Anchored to the end edge of the trigger.</div>
</aegov-popover>
`,
})
export class PopoverAlignmentComponent {}
Trigger
By default the popover opens on click and stays open until the user clicks elsewhere or presses Escape — focus moves into the panel, since the user explicitly activated it. Set trigger="hover" to open on hover instead; a hover-triggered popover is a tooltip/hovercard pattern, so focus deliberately stays on the trigger rather than moving into the panel.
<aegov-popover trigger="click" position="bottom">
<aegov-button variant="secondary">Click to open</aegov-button>
<div slot="popover-content">Click triggers suit popovers users will read or interact with.</div>
</aegov-popover>
<aegov-popover trigger="hover" position="bottom">
<aegov-button variant="secondary">Hover to open</aegov-button>
<div slot="popover-content">Hover triggers suit transient information that doesn't need a click.</div>
</aegov-popover>
import { AegovPopover, AegovButton } from '@aegov/designsystem-react';
export default function PopoverTrigger() {
return (
<>
<AegovPopover trigger="click" position="bottom">
<AegovButton variant="secondary">Click to open</AegovButton>
<div slot="popover-content">Click triggers suit popovers users will read or interact with.</div>
</AegovPopover>
<AegovPopover trigger="hover" position="bottom">
<AegovButton variant="secondary">Hover to open</AegovButton>
<div slot="popover-content">Hover triggers suit transient information that doesn't need a click.</div>
</AegovPopover>
</>
);
}
<template>
<aegov-popover trigger="click" position="bottom">
<aegov-button variant="secondary">Click to open</aegov-button>
<div slot="popover-content">Click triggers suit popovers users will read or interact with.</div>
</aegov-popover>
<aegov-popover trigger="hover" position="bottom">
<aegov-button variant="secondary">Hover to open</aegov-button>
<div slot="popover-content">Hover triggers suit transient information that doesn't need a click.</div>
</aegov-popover>
</template>
import { Component } from '@angular/core';
import { AegovPopover, AegovButton } from '@aegov/designsystem-angular';
@Component({
selector: 'app-popover-trigger',
imports: [AegovPopover, AegovButton],
template: `
<aegov-popover trigger="click" position="bottom">
<aegov-button variant="secondary">Click to open</aegov-button>
<div slot="popover-content">Click triggers suit popovers users will read or interact with.</div>
</aegov-popover>
<aegov-popover trigger="hover" position="bottom">
<aegov-button variant="secondary">Hover to open</aegov-button>
<div slot="popover-content">Hover triggers suit transient information that doesn't need a click.</div>
</aegov-popover>
`,
})
export class PopoverTriggerComponent {}
Delay
When trigger="hover", delay-start (default 200ms) controls how long the user must keep hovering before the popover appears, and delay-end (default 0ms, with a 100ms minimum grace period always applied) adds a brief delay before it hides — enough time to move the cursor onto the panel itself.
<aegov-popover trigger="hover" delay-start="200" position="bottom">
<aegov-button variant="secondary">Default delay (200ms)</aegov-button>
<div slot="popover-content">Opens after the default 200ms hover delay.</div>
</aegov-popover>
<aegov-popover trigger="hover" delay-start="500" position="bottom">
<aegov-button variant="secondary">Slow appearance (500ms)</aegov-button>
<div slot="popover-content">Appears after 500ms of sustained hover.</div>
</aegov-popover>
<aegov-popover trigger="hover" delay-start="0" delay-end="300" position="bottom">
<aegov-button variant="secondary">Slow hide (300ms)</aegov-button>
<div slot="popover-content">Stays open for 300ms after the cursor leaves.</div>
</aegov-popover>
import { AegovPopover, AegovButton } from '@aegov/designsystem-react';
export default function PopoverDelay() {
return (
<>
<AegovPopover trigger="hover" delayStart={200} position="bottom">
<AegovButton variant="secondary">Default delay (200ms)</AegovButton>
<div slot="popover-content">Opens after the default 200ms hover delay.</div>
</AegovPopover>
<AegovPopover trigger="hover" delayStart={500} position="bottom">
<AegovButton variant="secondary">Slow appearance (500ms)</AegovButton>
<div slot="popover-content">Appears after 500ms of sustained hover.</div>
</AegovPopover>
<AegovPopover trigger="hover" delayStart={0} delayEnd={300} position="bottom">
<AegovButton variant="secondary">Slow hide (300ms)</AegovButton>
<div slot="popover-content">Stays open for 300ms after the cursor leaves.</div>
</AegovPopover>
</>
);
}
<template>
<aegov-popover trigger="hover" delay-start="200" position="bottom">
<aegov-button variant="secondary">Default delay (200ms)</aegov-button>
<div slot="popover-content">Opens after the default 200ms hover delay.</div>
</aegov-popover>
<aegov-popover trigger="hover" delay-start="500" position="bottom">
<aegov-button variant="secondary">Slow appearance (500ms)</aegov-button>
<div slot="popover-content">Appears after 500ms of sustained hover.</div>
</aegov-popover>
<aegov-popover trigger="hover" delay-start="0" delay-end="300" position="bottom">
<aegov-button variant="secondary">Slow hide (300ms)</aegov-button>
<div slot="popover-content">Stays open for 300ms after the cursor leaves.</div>
</aegov-popover>
</template>
import { Component } from '@angular/core';
import { AegovPopover, AegovButton } from '@aegov/designsystem-angular';
@Component({
selector: 'app-popover-delay',
imports: [AegovPopover, AegovButton],
template: `
<aegov-popover trigger="hover" [delayStart]="200" position="bottom">
<aegov-button variant="secondary">Default delay (200ms)</aegov-button>
<div slot="popover-content">Opens after the default 200ms hover delay.</div>
</aegov-popover>
<aegov-popover trigger="hover" [delayStart]="500" position="bottom">
<aegov-button variant="secondary">Slow appearance (500ms)</aegov-button>
<div slot="popover-content">Appears after 500ms of sustained hover.</div>
</aegov-popover>
<aegov-popover trigger="hover" [delayStart]="0" [delayEnd]="300" position="bottom">
<aegov-button variant="secondary">Slow hide (300ms)</aegov-button>
<div slot="popover-content">Stays open for 300ms after the cursor leaves.</div>
</aegov-popover>
`,
})
export class PopoverDelayComponent {}
Gap and offset
gap (pixels, default 10) controls the distance between the trigger and the popover. offset (default 0) shifts the popover along its cross-axis — useful when the trigger has visual padding that the popover shouldn't appear to overlap.
<aegov-popover position="bottom" gap="2">
<aegov-button variant="secondary">Tight (gap 2)</aegov-button>
<div slot="popover-content">Snug to the trigger — only 2px gap.</div>
</aegov-popover>
<aegov-popover position="bottom" gap="20">
<aegov-button variant="secondary">Loose (gap 20)</aegov-button>
<div slot="popover-content">A larger 20px gap from the trigger.</div>
</aegov-popover>
<aegov-popover position="bottom" gap="10" offset="40">
<aegov-button variant="secondary">Offset (40)</aegov-button>
<div slot="popover-content">Shifted 40px along the cross-axis.</div>
</aegov-popover>
import { AegovPopover, AegovButton } from '@aegov/designsystem-react';
export default function PopoverGapOffset() {
return (
<>
<AegovPopover position="bottom" gap={2}>
<AegovButton variant="secondary">Tight (gap 2)</AegovButton>
<div slot="popover-content">Snug to the trigger — only 2px gap.</div>
</AegovPopover>
<AegovPopover position="bottom" gap={20}>
<AegovButton variant="secondary">Loose (gap 20)</AegovButton>
<div slot="popover-content">A larger 20px gap from the trigger.</div>
</AegovPopover>
<AegovPopover position="bottom" gap={10} offset={40}>
<AegovButton variant="secondary">Offset (40)</AegovButton>
<div slot="popover-content">Shifted 40px along the cross-axis.</div>
</AegovPopover>
</>
);
}
<template>
<aegov-popover position="bottom" gap="2">
<aegov-button variant="secondary">Tight (gap 2)</aegov-button>
<div slot="popover-content">Snug to the trigger — only 2px gap.</div>
</aegov-popover>
<aegov-popover position="bottom" gap="20">
<aegov-button variant="secondary">Loose (gap 20)</aegov-button>
<div slot="popover-content">A larger 20px gap from the trigger.</div>
</aegov-popover>
<aegov-popover position="bottom" gap="10" offset="40">
<aegov-button variant="secondary">Offset (40)</aegov-button>
<div slot="popover-content">Shifted 40px along the cross-axis.</div>
</aegov-popover>
</template>
import { Component } from '@angular/core';
import { AegovPopover, AegovButton } from '@aegov/designsystem-angular';
@Component({
selector: 'app-popover-gap-offset',
imports: [AegovPopover, AegovButton],
template: `
<aegov-popover position="bottom" [gap]="2">
<aegov-button variant="secondary">Tight (gap 2)</aegov-button>
<div slot="popover-content">Snug to the trigger — only 2px gap.</div>
</aegov-popover>
<aegov-popover position="bottom" [gap]="20">
<aegov-button variant="secondary">Loose (gap 20)</aegov-button>
<div slot="popover-content">A larger 20px gap from the trigger.</div>
</aegov-popover>
<aegov-popover position="bottom" [gap]="10" [offset]="40">
<aegov-button variant="secondary">Offset (40)</aegov-button>
<div slot="popover-content">Shifted 40px along the cross-axis.</div>
</aegov-popover>
`,
})
export class PopoverGapOffsetComponent {}
Disabled state
Set is-disabled to prevent the popover from opening at all. The trigger still renders and stays in the tab order — only the popover behaviour is suppressed. Useful when the action the popover supports is conditionally unavailable.
<aegov-popover position="bottom">
<aegov-button variant="secondary">Enabled</aegov-button>
<div slot="popover-content">This popover opens normally.</div>
</aegov-popover>
<aegov-popover position="bottom" is-disabled="true">
<aegov-button variant="secondary" disabled>Disabled</aegov-button>
<div slot="popover-content">This content is never shown.</div>
</aegov-popover>
import { AegovPopover, AegovButton } from '@aegov/designsystem-react';
export default function PopoverDisabled() {
return (
<>
<AegovPopover position="bottom">
<AegovButton variant="secondary">Enabled</AegovButton>
<div slot="popover-content">This popover opens normally.</div>
</AegovPopover>
<AegovPopover position="bottom" isDisabled>
<AegovButton variant="secondary" disabled>Disabled</AegovButton>
<div slot="popover-content">This content is never shown.</div>
</AegovPopover>
</>
);
}
<template>
<aegov-popover position="bottom">
<aegov-button variant="secondary">Enabled</aegov-button>
<div slot="popover-content">This popover opens normally.</div>
</aegov-popover>
<aegov-popover position="bottom" is-disabled="true">
<aegov-button variant="secondary" disabled>Disabled</aegov-button>
<div slot="popover-content">This content is never shown.</div>
</aegov-popover>
</template>
import { Component } from '@angular/core';
import { AegovPopover, AegovButton } from '@aegov/designsystem-angular';
@Component({
selector: 'app-popover-disabled',
imports: [AegovPopover, AegovButton],
template: `
<aegov-popover position="bottom">
<aegov-button variant="secondary">Enabled</aegov-button>
<div slot="popover-content">This popover opens normally.</div>
</aegov-popover>
<aegov-popover position="bottom" [isDisabled]="true">
<aegov-button variant="secondary" disabled>Disabled</aegov-button>
<div slot="popover-content">This content is never shown.</div>
</aegov-popover>
`,
})
export class PopoverDisabledComponent {}
Composing with a form field
A popover suits in-context help — clicking an info icon next to a field opens a short explanation, optionally with a link to a fuller article. Because the popover is interactive (trigger="click"), the link inside is keyboard-reachable — a tooltip would not allow that.
International Bank Account Number
A UAE IBAN is 23 characters long and starts with AE.
Read full guidance<div class="max-w-md">
<div class="flex items-center gap-2 mb-2">
<label for="iban" class="font-semibold">IBAN</label>
<aegov-popover position="top" align="start">
<aegov-button is-icon appearance="soft" size="xs" aria-label="What is an IBAN?">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4M12 8h.01"></path></svg>
</aegov-button>
<div slot="popover-content" class="max-w-xs">
<h3 class="text-base font-semibold mb-2">International Bank Account Number</h3>
<p class="text-sm mb-2">A UAE IBAN is 23 characters long and starts with <strong>AE</strong>. You will find it on the front of your bank card or on a recent bank statement.</p>
<a href="#" class="text-sm text-primary-600 hover:underline">Read full guidance</a>
</div>
</aegov-popover>
</div>
<aegov-input field-id="iban" placeholder="AE07 0331 2345 6789 0123 456"></aegov-input>
</div>
import { AegovPopover, AegovButton, AegovInput } from '@aegov/designsystem-react';
export default function PopoverFormField() {
return (
<div className="max-w-md">
<div className="flex items-center gap-2 mb-2">
<label htmlFor="iban" className="font-semibold">IBAN</label>
<AegovPopover position="top" align="start">
<AegovButton isIcon appearance="soft" size="xs" aria-label="What is an IBAN?">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4M12 8h.01"></path></svg>
</AegovButton>
<div slot="popover-content" className="max-w-xs">
<h3 className="text-base font-semibold mb-2">International Bank Account Number</h3>
<p className="text-sm mb-2">A UAE IBAN is 23 characters long and starts with <strong>AE</strong>. You will find it on the front of your bank card or on a recent bank statement.</p>
<a href="#" className="text-sm text-primary-600 hover:underline">Read full guidance</a>
</div>
</AegovPopover>
</div>
<AegovInput fieldId="iban" placeholder="AE07 0331 2345 6789 0123 456" />
</div>
);
}
<template>
<div class="max-w-md">
<div class="flex items-center gap-2 mb-2">
<label for="iban" class="font-semibold">IBAN</label>
<aegov-popover position="top" align="start">
<aegov-button is-icon appearance="soft" size="xs" aria-label="What is an IBAN?">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4M12 8h.01"></path></svg>
</aegov-button>
<div slot="popover-content" class="max-w-xs">
<h3 class="text-base font-semibold mb-2">International Bank Account Number</h3>
<p class="text-sm mb-2">A UAE IBAN is 23 characters long and starts with <strong>AE</strong>. You will find it on the front of your bank card or on a recent bank statement.</p>
<a href="#" class="text-sm text-primary-600 hover:underline">Read full guidance</a>
</div>
</aegov-popover>
</div>
<aegov-input field-id="iban" placeholder="AE07 0331 2345 6789 0123 456"></aegov-input>
</div>
</template>
import { Component } from '@angular/core';
import { AegovPopover, AegovButton, AegovInput } from '@aegov/designsystem-angular';
@Component({
selector: 'app-popover-form-field',
imports: [AegovPopover, AegovButton, AegovInput],
template: `
<div class="max-w-md">
<div class="flex items-center gap-2 mb-2">
<label for="iban" class="font-semibold">IBAN</label>
<aegov-popover position="top" align="start">
<aegov-button is-icon appearance="soft" size="xs" aria-label="What is an IBAN?">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4M12 8h.01"></path></svg>
</aegov-button>
<div slot="popover-content" class="max-w-xs">
<h3 class="text-base font-semibold mb-2">International Bank Account Number</h3>
<p class="text-sm mb-2">A UAE IBAN is 23 characters long and starts with <strong>AE</strong>. You will find it on the front of your bank card or on a recent bank statement.</p>
<a href="#" class="text-sm text-primary-600 hover:underline">Read full guidance</a>
</div>
</aegov-popover>
</div>
<aegov-input field-id="iban" placeholder="AE07 0331 2345 6789 0123 456"></aegov-input>
</div>
`,
})
export class PopoverFormFieldComponent {}
Composing with a quick actions menu
Popovers also work well as compact action menus attached to a row, card, or service tile. Because the content inside is fully focusable, keyboard users can reach every link or button.
Application #AE-2026-0419-3128
Submitted 12 March 2026
<div class="bg-white border border-aeblack-100 rounded-lg p-4 flex items-center justify-between max-w-md">
<div>
<h3 class="text-lg font-semibold">Application #AE-2026-0419-3128</h3>
<p class="text-sm text-aeblack-500">Submitted 12 March 2026</p>
</div>
<aegov-popover position="bottom" align="end">
<aegov-button variant="neutral-min" appearance="link" aria-label="More actions">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><circle cx="5" cy="12" r="2"></circle><circle cx="12" cy="12" r="2"></circle><circle cx="19" cy="12" r="2"></circle></svg>
</aegov-button>
<div slot="popover-content" class="min-w-[12rem]">
<ul class="space-y-1 text-sm">
<li><a href="#" class="block px-2 py-1 hover:bg-aeblack-50 rounded">View details</a></li>
<li><a href="#" class="block px-2 py-1 hover:bg-aeblack-50 rounded">Download receipt</a></li>
<li><a href="#" class="block px-2 py-1 hover:bg-aeblack-50 rounded text-aered-600">Cancel application</a></li>
</ul>
</div>
</aegov-popover>
</div>
import { AegovPopover, AegovButton } from '@aegov/designsystem-react';
export default function PopoverQuickActions() {
return (
<div className="bg-white border border-aeblack-100 rounded-lg p-4 flex items-center justify-between max-w-md">
<div>
<h3 className="text-lg font-semibold">Application #AE-2026-0419-3128</h3>
<p className="text-sm text-aeblack-500">Submitted 12 March 2026</p>
</div>
<AegovPopover position="bottom" align="end">
<AegovButton variant="neutral-min" appearance="link" aria-label="More actions">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><circle cx="5" cy="12" r="2"></circle><circle cx="12" cy="12" r="2"></circle><circle cx="19" cy="12" r="2"></circle></svg>
</AegovButton>
<div slot="popover-content" className="min-w-[12rem]">
<ul className="space-y-1 text-sm">
<li><a href="#" className="block px-2 py-1 hover:bg-aeblack-50 rounded">View details</a></li>
<li><a href="#" className="block px-2 py-1 hover:bg-aeblack-50 rounded">Download receipt</a></li>
<li><a href="#" className="block px-2 py-1 hover:bg-aeblack-50 rounded text-aered-600">Cancel application</a></li>
</ul>
</div>
</AegovPopover>
</div>
);
}
<template>
<div class="bg-white border border-aeblack-100 rounded-lg p-4 flex items-center justify-between max-w-md">
<div>
<h3 class="text-lg font-semibold">Application #AE-2026-0419-3128</h3>
<p class="text-sm text-aeblack-500">Submitted 12 March 2026</p>
</div>
<aegov-popover position="bottom" align="end">
<aegov-button variant="neutral-min" appearance="link" aria-label="More actions">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><circle cx="5" cy="12" r="2"></circle><circle cx="12" cy="12" r="2"></circle><circle cx="19" cy="12" r="2"></circle></svg>
</aegov-button>
<div slot="popover-content" class="min-w-[12rem]">
<ul class="space-y-1 text-sm">
<li><a href="#" class="block px-2 py-1 hover:bg-aeblack-50 rounded">View details</a></li>
<li><a href="#" class="block px-2 py-1 hover:bg-aeblack-50 rounded">Download receipt</a></li>
<li><a href="#" class="block px-2 py-1 hover:bg-aeblack-50 rounded text-aered-600">Cancel application</a></li>
</ul>
</div>
</aegov-popover>
</div>
</template>
import { Component } from '@angular/core';
import { AegovPopover, AegovButton } from '@aegov/designsystem-angular';
@Component({
selector: 'app-popover-quick-actions',
imports: [AegovPopover, AegovButton],
template: `
<div class="bg-white border border-aeblack-100 rounded-lg p-4 flex items-center justify-between max-w-md">
<div>
<h3 class="text-lg font-semibold">Application #AE-2026-0419-3128</h3>
<p class="text-sm text-aeblack-500">Submitted 12 March 2026</p>
</div>
<aegov-popover position="bottom" align="end">
<aegov-button variant="neutral-min" appearance="link" aria-label="More actions">
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><circle cx="5" cy="12" r="2"></circle><circle cx="12" cy="12" r="2"></circle><circle cx="19" cy="12" r="2"></circle></svg>
</aegov-button>
<div slot="popover-content" class="min-w-[12rem]">
<ul class="space-y-1 text-sm">
<li><a href="#" class="block px-2 py-1 hover:bg-aeblack-50 rounded">View details</a></li>
<li><a href="#" class="block px-2 py-1 hover:bg-aeblack-50 rounded">Download receipt</a></li>
<li><a href="#" class="block px-2 py-1 hover:bg-aeblack-50 rounded text-aered-600">Cancel application</a></li>
</ul>
</div>
</aegov-popover>
</div>
`,
})
export class PopoverQuickActionsComponent {}
React only: when it opens, aegov-popover moves its popover-content to the end of document.body so it can escape clipping and stack above the page. React listens for events on your app's root element, so a plain onClick, onChange or onInput on anything inside the popover-content slot never fires. Use the wrapper's own events instead — onAegovButtonClick on AegovButton — or bind native elements such as <button> with addEventListener through a ref (see Using with React). Links with an href need no handler and work as usual. The trigger in the default slot is not moved, so its handlers work.
RTL support
The popover's own positioning is direction-aware: it reads direction from the host's own ancestor chain (which is never moved — only the panel content is portalled), so position's absolute viewport sides (top/right/bottom/left) stay fixed, while align="start"/"end" correctly follow the reading direction for top/bottom. The portal also copies the host's computed direction as dir each time it opens, so content inside a local dir="rtl" wrapper stays right-to-left in the panel even though it is moved to document.body.
اختصارات الخدمات
<div dir="rtl">
<aegov-popover position="bottom" align="start">
<aegov-button variant="secondary">إجراءات سريعة</aegov-button>
<div slot="popover-content" dir="rtl">
<h3 class="text-base font-semibold mb-2">اختصارات الخدمات</h3>
<ul class="space-y-1 text-sm">
<li><a href="#" class="text-primary-600 hover:underline">تجديد الهوية الإماراتية</a></li>
<li><a href="#" class="text-primary-600 hover:underline">دفع المخالفات المرورية</a></li>
<li><a href="#" class="text-primary-600 hover:underline">متابعة الطلب</a></li>
</ul>
</div>
</aegov-popover>
</div>
import { AegovPopover, AegovButton } from '@aegov/designsystem-react';
export default function RtlPopover() {
return (
<div dir="rtl">
<AegovPopover position="bottom" align="start">
<AegovButton variant="secondary">إجراءات سريعة</AegovButton>
<div slot="popover-content" dir="rtl">
<h3 className="text-base font-semibold mb-2">اختصارات الخدمات</h3>
<ul className="space-y-1 text-sm">
<li><a href="#" className="text-primary-600 hover:underline">تجديد الهوية الإماراتية</a></li>
<li><a href="#" className="text-primary-600 hover:underline">دفع المخالفات المرورية</a></li>
</ul>
</div>
</AegovPopover>
</div>
);
}
<template>
<div dir="rtl">
<aegov-popover position="bottom" align="start">
<aegov-button variant="secondary">إجراءات سريعة</aegov-button>
<div slot="popover-content" dir="rtl">
<h3 class="text-base font-semibold mb-2">اختصارات الخدمات</h3>
<ul class="space-y-1 text-sm">
<li><a href="#" class="text-primary-600 hover:underline">تجديد الهوية الإماراتية</a></li>
<li><a href="#" class="text-primary-600 hover:underline">دفع المخالفات المرورية</a></li>
</ul>
</div>
</aegov-popover>
</div>
</template>
import { Component } from '@angular/core';
import { AegovPopover, AegovButton } from '@aegov/designsystem-angular';
@Component({
selector: 'app-rtl-popover',
imports: [AegovPopover, AegovButton],
template: `
<div dir="rtl">
<aegov-popover position="bottom" align="start">
<aegov-button variant="secondary">إجراءات سريعة</aegov-button>
<div slot="popover-content" dir="rtl">
<h3 class="text-base font-semibold mb-2">اختصارات الخدمات</h3>
<ul class="space-y-1 text-sm">
<li><a href="#" class="text-primary-600 hover:underline">تجديد الهوية الإماراتية</a></li>
<li><a href="#" class="text-primary-600 hover:underline">دفع المخالفات المرورية</a></li>
</ul>
</div>
</aegov-popover>
</div>
`,
})
export class RtlPopoverComponent {}
Usage
Here is the recommended usage of a popover on any website or application. These are recommended usage guides, however the developer must use the best practices of web and application development to accurately use this component.
Give an icon-only trigger a real accessible name
A trigger with no visible text — a "more actions" icon button, for example — needs aria-label. The popover panel is then automatically labelled by the trigger, so this one attribute covers both.
Keep popover content compact and self-contained
A short explanation, a small set of links, or a handful of quick actions are ideal. If the content grows into a multi-step flow or a real form, reach for aegov-modal or aegov-drawer instead.
Reach for trigger="click" when the content is interactive
Only a click-triggered popover moves focus into the panel — a hover-triggered one deliberately keeps focus on the trigger, so links or buttons inside a hover popover are much harder for a keyboard user to reach.
Don't nest a second popover, dropdown, or menu inside a popover's content
Only one popover can be open at a time by design — opening a nested one would immediately close the parent. Keep popover content flat.
Don't style popover-content with anything that depends on its original parent's layout
The content is physically moved into a portal at document.body while open — CSS that relies on inherited context from its original position (container queries, an ancestor's descendant selectors, a parent's stacking context) won''t apply once it''s there. Text direction is the exception: the portal copies the host's computed direction.
Don't use a popover for a single line of hint text with no interaction
That's what aegov-tooltip is for — it's lighter-weight and doesn't trap focus. Reach for a popover specifically when the content needs to be read at length or contains something focusable.
API reference
The following are the properties and references of a popover
Properties
| Attribute | Description | Type | Default |
|---|---|---|---|
| DOM |
| auto-generated |
| How the popover is opened. |
|
|
| Preferred side of the trigger. The popover automatically flips to the opposite side when there is not enough room. |
|
|
| Alignment along the popover's cross-axis relative to the trigger. |
|
|
| Distance in pixels between the trigger and the popover. |
|
|
| Additional offset along the cross-axis, in pixels. |
|
|
| Suppresses opening the popover by click, hover or focus. The trigger still renders and stays in the tab order, with no visual change — disable or restyle the trigger yourself if needed. It does not close a panel that is already open. |
|
|
| Delay before showing on hover, in milliseconds. Only relevant when |
|
|
| Delay before hiding on hover, in milliseconds. A 100ms minimum grace period is always applied for hover regardless of this value, so the user has time to move the cursor onto the panel. |
|
|
Slots
| Slot | Description |
|---|---|
(default) | The trigger element — typically a button or icon button. |
| The popover body. Accepts any HTML or other components. |
Events
| Event | Detail | Description |
|---|---|---|
|
| Fired when the popover transitions to open. |
|
| Fired when the popover transitions to closed, whatever the cause — including another popover opening. |
Methods
| Method | Returns | Description |
|---|---|---|
|
| Programmatically closes the popover if it is open and returns focus to the trigger. There is no |
Pass-through attributes
| Attribute group | Forwarded? | Notes |
|---|---|---|
| No | Apply directly to the trigger element you slot in, or to |
| Allowed | Applied to the host element. |
Notes
The following notes are applicable of this component.
Built-in accessibility
aria-haspopup="dialog"andaria-expandedare set on the first real focusable element inside the trigger slot (not just the wrapper), including reaching inside a shadow-DOM trigger likeaegov-button.- The portalled panel renders with
role="dialog"and is labelled by the trigger viaaria-labelledby. - For
trigger="click", opening moves focus to the first focusable element inside the panel; with no focusable content, the panel container itself receives focus so assistive technology still announces it. Tab/Shift+TabandArrowUp/ArrowDownall cycle focus through the focusable elements inside the panel while it's open. Only light-DOM focusable elements (native links, buttons, inputs) are found — shadow-DOM components such asaegov-buttoninside the panel are not focused on open or reached withTab.Escapecloses the popover and returns focus to the trigger.- For
trigger="hover", the popover also opens on keyboard focus and closes on blur (so hover is never the only way in) — focus deliberately stays on the trigger itself rather than moving into the panel, since this pattern is a hovercard, not a dialog. - Clicking outside the trigger and panel closes the popover; scrolling the trigger out of the viewport closes it too.
- Only one popover can be open at a time — opening a new one closes whichever was already open.
Developer responsibilities
- Give an icon-only trigger a real
aria-label— the panel is labelled through the trigger, so this one attribute covers both. - Keep popover content compact and self-contained; move to
aegov-modal/aegov-draweronce it grows into a real form or multi-step flow. - Mark up list-style content with
<ul>/<li>and real links so keyboard users can move through it naturally. - If the panel has a heading, pick the level that follows the surrounding section (an
<h3>under an<h2>), not a smaller one for its size; style the size with classes. - Use native
<a href>,<button>and<input>elements inside the panel so its focus handling can reach them, and avoid controls that need arrow keys (a select or textarea) —ArrowUp/ArrowDownmove focus between panel controls while it is open.
Keyboard support
| Key | Action |
|---|---|
Enter, Space |
Open the popover when the (click) trigger is focused. |
Tab (into trigger) |
Opens the popover when trigger="hover" (keyboard-focus equivalent of hover). While a hover popover is open, Tab stays on the trigger — press Escape first to move on. |
Escape |
Close the popover and return focus to the trigger. |
Tab / Shift + Tab |
Cycle through focusable elements inside the open panel. |
ArrowDown / ArrowUp |
Move to the next/previous focusable element inside the open panel. |
Notes
- An unrecognised
trigger,position, oralignvalue falls back to its documented default. - Popover content is moved — not cloned — into the portal while open, and returned to its original slot location when closed. Avoid styling it with anything that depends on its original parent's layout context.