brows3r — TypeScript API
    Preparing search index...

    Function useFocusReturn

    • Capture the currently focused element on mount (or on active flip to true) and restore focus to it when active becomes false.

      Usage: const triggerRef = useFocusReturn(isDialogOpen);

      Parameters

      • active: boolean

      Returns RefObject<HTMLElement | null>