@mica/sdk (SDK contract v1)
    Preparing search index...

    Interface FocusTrapOptions

    interface FocusTrapOptions {
        enabled?: boolean;
        returnFocusTo?: () => HTMLElement | null;
    }
    Index
    enabled?: boolean

    Off by default for a surface that is conditionally modal. Passing false leaves the node in the stack's place but makes it transparent to the key handler, so a caller does not have to tear the action down and rebuild it to suspend the trap.

    returnFocusTo?: () => HTMLElement | null

    Where focus goes when the trap is torn down. Defaults to whatever was focused when it was set up, which is what "focus returns to whatever opened it" means in practice — the launcher icon, the status bar, the row that opened the dialog.