For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /dolan/popover.md.

Popover

Show a little content from the control that opens it, in Liquid Glass on iOS 26, without taking over the screen.

Installation

npx @blotch/dolan add popover
import {
  UiPopover,
  UiPopoverContent,
  UiPopoverTrigger,
} from '../components/ui/popover';
Tip

This also adds Glass, which draws the popover, and Menu, whose placement it shares.

Usage

import { Component } from '@angular/core';
import { LYNX_ELEMENTS } from '@blotch/angular-lynx';
import { UiGlass } from '../components/ui/glass';
import { UiIcon } from '../components/ui/icon';
import {
  UiPopover,
  UiPopoverContent,
  UiPopoverTrigger,
} from '../components/ui/popover';

@Component({
  selector: 'app-trip-header',
  imports: [
    LYNX_ELEMENTS,
    UiGlass,
    UiIcon,
    UiPopover,
    UiPopoverContent,
    UiPopoverTrigger,
  ],
  template: `
    <ui-popover>
      <blur-view
        ui-glass
        uiPopoverTrigger
        shape="circle"
        class="h-11 w-11 items-center flex justify-center"
        [accessibility-element]="true"
        accessibility-traits="button"
        accessibility-label="About this trip"
      >
        <ui-icon name="info" />
      </blur-view>

      <ui-popover-content class="w-64">
        <text class="text-base font-semibold text-glass-foreground">
          Kyoto, April 2 to 9
        </text>
        <text class="text-sm text-glass-muted-foreground">
          Seven nights, three temples a day.
        </text>
      </ui-popover-content>
    </ui-popover>
  `,
})
export class TripHeader {}
  • uiPopoverTrigger marks the element that opens it. A tap on it opens the popover, and closes it again where the popover opens beside it. Anything can be the trigger: a glass button, a Button, or your own view.
  • <ui-popover-content> is the popover. Put any Lynx elements in it: text, buttons, a stepper. It's a padded column; its class sets its width, padding and spacing.
  • Color text with text-glass-foreground and text-glass-muted-foreground. They stay legible on glass and on Android's solid surface.
  • A touch anywhere else closes it, and still does what it would have. Nothing dims and nothing blocks the screen, so one tap can close the popover and press the button under your finger.
  • It stays on screen and inside the safe area. Near the bottom of the screen it opens upward, and in the right half it lines up with the trigger's right edge.
  • [(open)] opens and closes it from code, as with Dialog.

What each platform draws

PlatformWhat you get
iOS 26 and laterLiquid Glass that grows out of the trigger, over it, and shrinks back into it
iOS 15 to 25The frosted material beside the trigger, with an arrow pointing at it
AndroidA Material 3 menu surface that unfolds below the trigger, solid with a shadow
Android, with provideGlass({ android: 'glass' })Liquid Glass, as on iOS 26
Web previewLiquid Glass, as on iOS 26
  • iOS 26 grows a popover out of its source control and hides the control until it closes. The popover is one glass shape whose frame grows, so the trigger seems to open into it. A trigger that's glass itself hands its glass over, in the app ng build --platform ios builds: its icon fades out as the popover grows, and back in as it closes (see Glass).
  • Before iOS 26, Apple's guidelines sent popovers on iPhone to a sheet. This one stays a floating panel by its trigger, as UIKit drew a popover when the app kept it one, so the same code doesn't turn into a sheet that covers the screen.
  • On Android, Material 3 has no popover. Its menu surface is the container it anchors to a control for content of any kind. A rich tooltip holds only a title, a few lines of text and up to two text buttons, so it can't take the controls a popover can.

Without a trigger

Leave out uiPopoverTrigger and the popover opens from <ui-popover>'s own element, from code:

<ui-popover [(open)]="showHint">
  <text class="text-sm text-muted-foreground">Swipe a trip to archive it</text>
  <ui-popover-content>
    <text class="text-sm text-glass-foreground">Try it on Kyoto.</text>
  </ui-popover-content>
</ui-popover>

API

UiPopover

InputTypeDefaultDescription
openbooleanfalseWhether the popover is open. Supports [(open)].
OutputTypeDescription
openChangebooleanEmits when the trigger or a touch outside it opens or closes it.
closedvoidEmits after the close animation finishes.
MethodDescription
toggle()Opens or closes the popover.
close()Closes the popover.

UiPopoverTrigger

Selector: [uiPopoverTrigger]. Put it on the element inside <ui-popover> that opens it. A touch on it doesn't count as one outside the popover, so tapping it again closes the popover rather than reopening it.

UiPopoverContent

InputTypeDefaultDescription
classstring''Classes for the content's column, merged with flex-col gap-1 p-4.

Theme colors

The content's text reads glass-foreground and glass-muted-foreground. See Glass.

Accessibility

  • When the popover opens, a screen reader moves into it. The rest of the screen stays reachable, as it does for touch. Activating something else there closes the popover, as a tap would.
  • Name an icon-only trigger with accessibility-label, as in the example.
  • Reduce Motion: the popover doesn't grow or shrink. It appears in place, and its content fades in.
  • Reduce Transparency and Increase Contrast apply as on all glass.
  • Android's back button closes it, as a tap outside does, before it goes back a screen or leaves the app.
  • Action Sheet: choices about an action, opened from its control the same way
  • Menu: a list of actions that grows out of its button
  • Glass: the material the popover is drawn with
  • Dialogs and overlays: how overlays work and which one to use