interface / @typed/ui/Popover

TriggerOptions

Options for the native popover trigger.

Learn this UI primitive →

Package version
1.0.0-beta.13
Category
Opening controls
Since
1.0.0

Import

import { TriggerOptions } from "@typed/ui/Popover";

Signatures

export interface TriggerOptions extends Dom.HostOptions<HTMLButtonElement> {
    readonly state: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
    readonly controls?: string;
    readonly content: Renderable.Any;
}

Why

The trigger exposes native target attributes when an id is supplied and a state-driven fallback otherwise.

Ownership and lifetime

Options are inert; rendering owns listeners/subscriptions by Scope.

Property: content

Visible trigger content and accessible name.

Property: content: Why

A trigger needs a discoverable accessible name.

Property: content: Ownership and lifetime

Dynamic content follows the trigger Scope.

Property: controls

Id of content targeted through native popovertarget.

Property: controls: Why

Native targeting lets the browser run the Popover API lifecycle directly.

Property: controls: Ownership and lifetime

The string is reflected and retains no resources.

Property: state

Hydrated state shared with popover content.

Property: state: Why

It drives aria-expanded and fallback activation from one source.

Property: state: Ownership and lifetime

The trigger borrows state; its original Scope owns it.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source