Skip to content

patrickkabwe/react-native-nitro-in-app-browser

Repository files navigation

react-native-nitro-in-app-browser

A Simple React Native Nitro module for in-app browser.

Build Android Build iOS

npm version npm downloads

Installation

Important

This package requires react-native-nitro-modules to be installed first. See react-native-nitro-modules for more information.

bun install react-native-nitro-in-app-browser react-native-nitro-modules
cd ios && pod install && cd ..

Usage

import React from 'react';
import { Button, SafeAreaView } from 'react-native';
import { NitroInAppBrowser } from 'react-native-nitro-in-app-browser';

const App = () => {
  return (
    <SafeAreaView>
      <Button
        title="Open Nowie Tech"
        onPress={() => {
          try {
            await NitroInAppBrowser.open('https://nowietech.com', {
              barColor: 'purple',
              controlColor: '#000000',
              dismissButtonLabel: 'close',
              presentationStyle: NitroInAppBrowserPresentationStyle.FullScreen,
            });
          } catch (error) {
            console.error(error);
          }
        }}
      />
    </SafeAreaView>
  );
};

export default App;

License

MIT


Created with Create Nitro Modules

Credits

This package is based on the react-native-nitro-modules package.