diff --git a/docs/platforms/react-native/user-feedback/configuration/index.mdx b/docs/platforms/react-native/user-feedback/configuration/index.mdx index 1cfa4cd6ab859..f188d24849939 100644 --- a/docs/platforms/react-native/user-feedback/configuration/index.mdx +++ b/docs/platforms/react-native/user-feedback/configuration/index.mdx @@ -39,6 +39,7 @@ The following options can be configured for the integration in `feedbackIntegrat | `showBranding` | `boolean` | `true` | Displays the Sentry logo. | | `showName` | `boolean` | `true` | Displays the name field on the feedback widget. | | `showEmail` | `boolean` | `true` | Displays the email field on the feedback widget. | +| `enableShakeToReport` | `boolean` | `false` | Opens the Feedback Widget when the user shakes the device. | | `enableScreenshot` | `boolean` | `false` | Allows the user to send a screenshot attachment with their feedback. | | `enableTakeScreenshot` | `boolean` | `false` | Determines whether the "Take Screenshot" button is displayed. | | `isNameRequired` | `boolean` | `false` | Requires the name field on the feedback widget to be filled in. | diff --git a/docs/platforms/react-native/user-feedback/index.mdx b/docs/platforms/react-native/user-feedback/index.mdx index e17f9082ccbd6..551be52bae1e9 100644 --- a/docs/platforms/react-native/user-feedback/index.mdx +++ b/docs/platforms/react-native/user-feedback/index.mdx @@ -40,7 +40,27 @@ Sentry.showFeedbackWidget(); Sentry.hideFeedbackButton(); ``` -Note that [the root application component must be wrapped with `Sentry.wrap`](/platforms/react-native/#wrap-your-app) for the `showFeedbackWidget` and `showFeedbackButton` methods to work. The methods depend on the React Native `Modal` implementation. It is supported fully in the legacy architecture. For the new architecture (Fabric renderer) it requires React Native `0.71` and up. +### Shake to Report + +You can enable shake-to-report so that shaking the device opens the Feedback Widget. Enable it declaratively via the `feedbackIntegration` option: + +```javascript +Sentry.feedbackIntegration({ + enableShakeToReport: true, +}); +``` + +Or control it programmatically: + +```javascript +// Start listening for shake gestures to open the feedback widget +Sentry.showFeedbackOnShake(); + +// Stop listening for shake gestures +Sentry.hideFeedbackOnShake(); +``` + +Note that [the root application component must be wrapped with `Sentry.wrap`](/platforms/react-native/#wrap-your-app) for the `showFeedbackWidget`, `showFeedbackButton`, and `showFeedbackOnShake` methods to work. The methods depend on the React Native `Modal` implementation. It is supported fully in the legacy architecture. For the new architecture (Fabric renderer) it requires React Native `0.71` and up. To configure the widget or the button you can use the `Sentry.feedbackIntegration({})` or add it to your Sentry initialization.