effex-monorepo
    Preparing search index...

    Interface FocusTrapOptions

    Options for creating a focus trap.

    interface FocusTrapOptions {
        container: HTMLElement;
        initialFocus?: HTMLElement | null;
        returnFocus?: HTMLElement | null;
    }
    Index

    Properties

    container: HTMLElement

    Element to trap focus within

    initialFocus?: HTMLElement | null

    Initial element to focus (default: first focusable element)

    returnFocus?: HTMLElement | null

    Element to return focus to when deactivated (default: previously focused element)