built-react-native-intercom-webview
v1.2.9
Published
React Native WebView containing Intercom
Downloads
11
Maintainers
Readme
react-native-intercom-webview
A React Native Component that renders Intercom in a React Native WebView. This plugin supports React Native version 0.40.
Usage
Inside your project directory, install the package:
npm i react-native-intercom-webview
You can use the component in your React Native component as follows:
- Import the IntercomWebView component:
import IntercomWebView from 'react-native-intercom-webview';
- Render the IntercomWebView component:
<IntercomWebView
appId="intercomappId"
name="intercom name"
email="intercom email"
defaultHeight={500}
hideLauncher={false}
showLoadingOverlay={true} />
Change the intercom details (appId, name, email) to your own.
The hideLauncher prop hides the Intercom launcher icon and automatically shows the Intercom messages. This is useful for rendering the Intercom messages when a user clicks on your own custom launcher (e.g. a button).
If defaultHeight is not provided, the IntercomWebView will attempt to fill the height of the window using the Dimension module.
Any other WebView props (exluding: source, injectedJavaScript, javaScriptEnabled) can be passed to the IntercomWebView component as props and they will be passed onto the underlying WebView component.
Contribute
To contribute, create a Pull Request:
https://github.com/donovantc/react-native-intercom-webview