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
Member of
Popover

Import

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

Access Popover.TriggerOptions through the imported Popover export. Its declaration below describes the member.

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

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