Use this guide after you have a working EmbedProvider + NavigationContainer setup from the React Native integration guide. Here you tune where the FAB appears, when it shows, and how it is positioned using includeScreens, embedButtonDelayMs, and embedButtonVisibilityConfig.
Before you use advanced visibility rules, confirm the following:
Requirement
Notes
React Native
0.70 or higher (same as main integration guide)
React Navigation
Root NavigationContainer with a shared navigationRef
Base embed setup
useInitialize, GestureHandlerRootView, and EmbedProvider wired as in the main guide
You will also need:
Route name values that match your navigators exactly (case-sensitive).
A clear idea of which flows should show the FAB (tabs, stacks, auth exclusions, etc.).
If navigationRef is missing or not the same ref as on NavigationContainer, the provider cannot detect screen changes and FAB visibility will not match your rules.
includeScreens: Route names where the button may appear. If omitted or empty, eligibility depends on backend and groups (see visibility groups). Names must match Stack.Screen name="..." exactly.
See Step 3 above. embedButtonDelayMs is the global default; embedButtonVisibilityConfig.defaultDelayMs and per-group delayMs override or refine behavior when you use groups.
import type { EmbedButtonVisibilityConfig, EmbedButtonGroupConfig, EmbedButtonContinuity, EmbedButtonDelayPolicy, EmbedButtonInset,} from '@revrag-ai/embed-react-native';
interface EmbedButtonVisibilityConfig { defaultDelayMs?: number; // Optional fallback when a group does not set delayMs defaultInset?: EmbedButtonInset; groups?: EmbedButtonGroupConfig[];}
When do you need defaultDelayMs? You do not need it if every group sets its own delayMs. It is a fallback when:
A group omits delayMs - that group falls back to defaultDelayMs, then top-level embedButtonDelayMs.
A screen is included (for example via includeScreens) but does not belong to any group - the provider uses defaultDelayMs (or embedButtonDelayMs) for that screen.
You can omit defaultDelayMs and defaultInset when every group defines its own delayMs and inset.
interface EmbedButtonGroupConfig { id: string; // Unique ID for this group screens: string[]; // Route names in this group continuity: EmbedButtonContinuity; inset?: EmbedButtonInset; delayMs?: number; delayPolicy?: EmbedButtonDelayPolicy;}
perScreen - Delay runs on every included screen in the group when you land on it.
oncePerGroupEntry - Delay runs when entering the group (first screen of that visit). Moving within the group does not re-trigger the delay (pairs well with continuous).
oncePerAppSession - Delay runs once per app session for that group; later visits to the group show the FAB immediately per policy.
1) navigationRef matches NavigationContainer. 2) EmbedProvider wraps NavigationContainer. 3) Current route is in includeScreens or a group screens list.
FAB on wrong screens
Route name values must match exactly (case-sensitive) your Stack.Screen (or equivalent) name.
Screen not interactive when FAB is visible
Overlay uses pointerEvents="box-none" so touches pass through except on the FAB. Update the SDK if behavior differs.
Wrong position
Set inset per group or defaultInset. Insets apply inside the FAB container on the full-screen overlay.
Delay feels wrong
Check delayPolicy and continuity: oncePerGroupEntry + continuous delays once on group entry; perScreen can re-apply on each screen.
Types not found
Import from @revrag-ai/embed-react-native: EmbedButtonVisibilityConfig, EmbedButtonGroupConfig, EmbedButtonContinuity, EmbedButtonDelayPolicy, EmbedButtonInset.
Quick checks (FAB never shows)
Log the active route name and compare to includeScreens / group screens.
Confirm EmbedProvider is outsideNavigationContainer and ref is the same object reference.
Temporarily set a broad includeScreens list to verify routing, then tighten.