Skip to main content
Glama
webview.md1.24 kB
--- title: React Native WebView sidebar_title: WebView description: A library that provides a WebView component. sourceCodeUrl: https://github.com/react-native-webview/react-native-webview packageName: react-native-webview platforms: ["android", "ios"] --- `react-native-webview` provides a `WebView` component that renders web content in a native view. ## Installation ## Usage You should refer to the [`react-native-webview` documentation](https://github.com/react-native-webview/react-native-webview/blob/master/docs/Guide.md#react-native-webview-guide) for more information on the API and its usage. The following example (courtesy of that repository) is a quick way to get up and running! {/* prettier-ignore */} ```jsx collapseHeight=310 return ( ); } const styles = StyleSheet.create({ container: { flex: 1, marginTop: Constants.statusBarHeight, }, }); ``` Minimal example with inline HTML: ```jsx collapseHeight=310 return ( <WebView style={styles.container} originWhitelist={['*']} source={{ html: '<h1><center>Hello world</center></h1>' }} /> ); } const styles = StyleSheet.create({ container: { flex: 1, marginTop: Constants.statusBarHeight, }, }); ```

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jaksm/expo-docs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server