Escape In-App Browser — Detect and escape from in-app browsers (Facebook, Instagram, Threads, Messenger, Twitter/X, TikTok, WhatsApp, WeChat, LINE, Snapchat, LinkedIn, Google Search App, KakaoTalk)
Open the shared link from Instagram, Facebook, Twitter, or any other app to test detection
<EiabSuccess> <p>You're in a normal browser!</p> </EiabSuccess> <EiabFailed> <p>Please open in Safari or Chrome.</p> </EiabFailed>
Loading...
Code Example:
<EiabSuccess> <p>You're in a normal browser!</p> </EiabSuccess> <EiabFailed> <p>Please open in Safari or Chrome.</p> </EiabFailed>
<EiabEscapeLink> Open in Safari </EiabEscapeLink>
<EscapeInAppBrowser
fallback={<EiabEscapeDialog />}
/>x-safari-https:// redirects. These components use window.open() from a user tap, which still works.x-safari-https://...Opens directly in Safari
intent://...#Intent;scheme=https;S.browser_fallback_url=...;endIntent URI opens user's default browser with fallback
kakaotalk://web/openExternal?url=...Uses KakaoTalk's native external browser scheme
?openExternalBrowser=1LINE respects this query parameter on both platforms
bun add eiab
import { attemptEscape } from "eiab"
// Auto-escapes if in-app browser detected
attemptEscape()import {
EscapeInAppBrowser,
EiabEscapeDialog,
} from "eiab/react"
export default function Layout({ children }) {
return (
<>
<EscapeInAppBrowser
fallback={<EiabEscapeDialog />}
/>
{children}
</>
)
}