UI Headless Runtime API - v1.0.0
    Preparing search index...

    Interface DialogOptions

    Dialog options for state ownership, focus, dismissal, and semantics.

    interface DialogOptions {
        closeOnEscape?: boolean;
        closeOnOutsidePointer?: boolean;
        defaultValue?: boolean;
        getValue?: () => boolean;
        id?: string;
        initialFocus?: () => HTMLElement | null;
        modal?: boolean;
        onValueChange?: (
            value: boolean,
            details: ChangeDetails<OpenChangeReason>,
        ) => void;
        restoreFocus?: boolean;
        subscribeValue?: (listener: () => void) => Unsubscribe;
    }

    Hierarchy

    Index

    Properties

    closeOnEscape?: boolean

    Disables topmost Escape dismissal when false.

    true

    closeOnOutsidePointer?: boolean

    Disables outside-pointer dismissal when false.

    true

    defaultValue?: boolean

    Initial value used only in uncontrolled mode.

    getValue?: () => boolean

    Reads the consumer-owned value. Its presence enables controlled mode.

    id?: string

    Deterministic content ID.

    initialFocus?: () => HTMLElement | null

    Resolves the preferred initial focus target after content binding.

    modal?: boolean

    Enables focus containment, sibling inerting, and scroll lock.

    true

    onValueChange?: (
        value: boolean,
        details: ChangeDetails<OpenChangeReason>,
    ) => void

    Receives every accepted value request and its typed cause.

    restoreFocus?: boolean

    Restores focus to a connected trigger or pre-open target.

    true

    subscribeValue?: (listener: () => void) => Unsubscribe

    Subscribes to consumer-owned value changes in controlled mode.