UNPKG

react-native-navigation-mode

Version:

Detect Android navigation mode (3-button, 2-button, or gesture)

40 lines 1.58 kB
import { type NavigationModeInfo } from './NativeNavigationMode'; export type { NavigationModeInfo }; /** * Get detailed navigation mode information * Returns navigation type, interaction mode, and device info */ export declare function getNavigationMode(): Promise<NavigationModeInfo>; /** * Quick check if the device is using gesture-based navigation * @returns Promise<boolean> - true if gesture navigation is active */ export declare function isGestureNavigation(): Promise<boolean>; /** * Get the navigation bar height in dp * @returns Promise<number> - navigation bar height in dp */ export declare function getNavigationBarHeight(): Promise<number>; /** * Hook for React components to get navigation mode. * * Re-fetches automatically when: * - the device rotates / the window is resized (the navigation bar height * differs between portrait and landscape, and on phones the 3-/2-button bar * even moves to a different edge), and * - the app returns to the foreground (the user may switch the system * navigation mode in Settings while the app is backgrounded). */ export declare function useNavigationMode(): { navigationMode: NavigationModeInfo | null; loading: boolean; error: Error | null; }; declare const _default: { readonly getNavigationMode: typeof getNavigationMode; readonly isGestureNavigation: typeof isGestureNavigation; readonly getNavigationBarHeight: typeof getNavigationBarHeight; readonly useNavigationMode: typeof useNavigationMode; }; export default _default; //# sourceMappingURL=index.d.ts.map