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 even on tap. For Instagram, these components emit its native instagram://extbrowser/ scheme as a best-effort escape — but the only guaranteed exit is the manual ••• → Open in external browser. Always offer Copy link as a fallback.instagram://extbrowser/?url=...Instagram's own native external-browser scheme (best-effort; pair with the manual fallback)
x-safari-https://...Opens Safari when the WebView allows it
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}
</>
)
}