Varendo

Popover

Contextual nonmodal surface with explicit focus/dismiss behavior and viewport containment.

FamilyfeedbackLicenseApache-2.0
StandaloneAvailable

Use the web element directly without the semantic runtime.

Semantic bindingAvailable

A registered presentation adapter can bind this component to host-owned meaning and state.

Automatic adaptationNo standard recipe

The standard recipe resolver does not select this component automatically.

Import and live example

One non-modal report-details popover opened beside its trigger.

Interactive preview requires JavaScript.

View the complete example source
import {registerAeliqoElements} from "@varendo/web";
import {
  AeliqoAlertElement,
  AeliqoDialogElement,
  AeliqoDrawerElement,
  AeliqoEmptyStateElement,
  AeliqoPopoverElement,
  AeliqoProgressElement,
  AeliqoSkeletonElement,
  AeliqoToastElement,
  AeliqoTooltipElement,
} from "@varendo/web/feedback";



registerAeliqoElements();

const host = document.querySelector<HTMLElement>("#aeliqo-example") ?? (() => {
  const created = document.createElement("div");
  created.id = "aeliqo-example";
  (document.body ?? document.documentElement).append(created);
  return created;
})();

function createCatalogRoot(container: HTMLElement): HTMLElement {
  const root = document.createElement("div");
  root.dataset.catalogSourceRoot = "true";
  root.style.display = "grid";
  root.style.gap = "12px";
  container.append(root);
  return root;
}

function createCatalogElement<T extends HTMLElement>(tagName: string, container: HTMLElement): T {
  const element = document.createElement(tagName) as T;
  element.setAttribute("data-aeliqo-theme", "light");
  container.append(element);
  return element;
}

function appendSlottedText(root: HTMLElement, slot: string, textContent: string): void {
  const content = document.createElement("span");
  content.slot = slot;
  content.textContent = textContent;
  root.append(content);
}

const root = createCatalogRoot(host);
(((root) => {
		const element = createCatalogElement<AeliqoPopoverElement>("aeliqo-popover", root);
		element.label = "Report details";
		element.content = "The report includes the authorized current scope.";
		element.open = true;
		element.modal = false;
	}))(root);

Purpose

A contextual surface anchored to a trigger, with an explicit open state and dismissal policy. The host picks nonmodal or modal behavior; the component emits a close request, not an action.

When to use it

When to use a different component

Properties and defaults

The host controls open state and chooses modal behavior; the popover does not execute actions itself.

Properties, ownership, and initial values
PropertyUse and ownershipDeclared typeInitial value
labelProvides the visible label and accessible name for the component.string'Open details'
contentProvides trusted plain content for the overlay. Do not pass untrusted HTML.string''
openControls whether the overlay or expandable surface is currently open.booleanfalse
modalChooses modal focus containment and background interaction behavior.booleanfalse
closeOnOutsideEnables or disables close on outside as explicit host-controlled state.booleantrue

Events

Events, payloads, timing, and application responsibilities
EventPayloadEmittedApplication responsibility
aeliqo-popover-closeThe close reason.After Escape or an allowed outside interaction.Set open to false and restore focus when appropriate.

Events cross the component boundary as user proposals. Validate their detail and current authority before applying a business effect.

Listen for aeliqo-popover-close

TypeScript example
const element = document.querySelector('aeliqo-popover');<p>element?.addEventListener('aeliqo-popover-close', (event) => {
  const proposal = (event as CustomEvent<unknown>).detail;
  // Validate the proposal, update host state, then assign controlled properties.
  applyProposal(proposal);
});

States and failure handling

Relevant states:

Expected result: The bounded surface exposes a labelled dialog boundary and emits a close request when dismissed.

Keyboard, focus, and accessibility

Keyboard behavior:

Exposed semantics:

Responsive behavior

Keep the popover inside the viewport and its trigger visible. Choose Dialog if the content cannot fit beside the current task.

Style hooks

Generated TypeScript declaration

View generated declaration
export declare class AeliqoPopoverElement extends AeliqoFoundationElement {
    static readonly properties: {
        label: {
            type: StringConstructor;
        };
        content: {
            type: StringConstructor;
        };
        open: {
            type: BooleanConstructor;
            reflect: boolean;
        };
        modal: {
            type: BooleanConstructor;
        };
        closeOnOutside: {
            type: BooleanConstructor;
            attribute: string;
        };
    };
    static readonly styles: import("lit").CSSResult[];
    label: string;
    content: string;
    open: boolean;
    modal: boolean;
    closeOnOutside: boolean;
    private readonly overlayFocus;
    private stopOutside;
    protected willUpdate(changed: Map<string, unknown>): void;
    protected updated(changed: Map<string, unknown>): void;
    private openPopover;
    private showModalPopover;
    private closePopover;
    disconnectedCallback(): void;
    private close;
    private keydown;
    private cancel;
    protected render(): import("lit").TemplateResult<1>;
}

Version

This page documents the Varendo 0.6 component contract.