interface OverlayOptions {
    anchor?: HTMLElement;
    dismissOnEscape?: boolean;
    dismissOnOutside?: boolean;
    edge?: HTMLElement;
    initialFocus?: null | HTMLElement;
    modal?: boolean;
    onClose?: () => void;
    placement?: "center" | "below" | "beside";
    restoreFocus?: boolean;
}

Properties

anchor?: HTMLElement

The control the panel opens from; positions the panel and keeps a click on it from counting as outside.

dismissOnEscape?: boolean

Close on Escape. Default true.

dismissOnOutside?: boolean

Close on a press outside the panel and its anchor. Default: not modal.

edge?: HTMLElement

A second element the panel should clear when placed beside (the rail, not just the button in it).

initialFocus?: null | HTMLElement

Where focus lands: an element, null to leave focus where it is, or the first control (default).

modal?: boolean

Draw a scrim and refuse outside dismissal. Default false; center placement implies it.

onClose?: () => void
placement?: "center" | "below" | "beside"

Where the panel goes relative to the anchor. Default below; center ignores the anchor.

restoreFocus?: boolean

Give focus back to the opener on close. Default true.