PostHogSurveyProviderProps

Properties

NameType
autoPresentSurveysboolean

Whether eligible popover surveys are automatically presented. (Default: true) Set to false to defer presentation — e.g. while a native-stack formSheet/modal is on top. Deferral is display-only: the survey stays armed and presents once this is true again. A survey already on screen is not interrupted when this becomes false.

You own flipping this back to true (e.g. wire it to route/screen focus). While it stays false the survey remains deferred and never shows — if the un-defer never happens (sheet dismissed without re-focusing the provider, an unmount, an error boundary), the survey stays armed indefinitely and no "survey shown" event fires.

defaultSurveyAppearanceSurveyAppearance

The default appearance for surveys when not specified in PostHog.

Accepts the React Native-only appearance fields as well (e.g. maxFontSizeMultiplier) — they are merged into the same theme object the survey components read, and PostHog never sends them down.

overrideAppearanceWithDefaultboolean

If true, PosHog appearance will be ignored and defaultSurveyAppearance is always used.

androidKeyboardBehavior"padding" | "height"

The keyboard avoiding behavior for the survey modal (KeyboardAvoidingView), applied only to Android devices.

  • 'padding': Adds padding to avoid keyboard (recommended)
  • 'height': Resizes the view height (default, for legacy - may cause flickering on some Android devices)
clientPostHog
childrenReact.ReactNode