GithubHelp home page GithubHelp logo

gemambu / react-native-browser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prestodoctor/react-native-browser

0.0 1.0 0.0 398 KB

Full-featured web browser module for React Native apps, based on TOWebViewController

License: MIT License

Objective-C 86.68% JavaScript 13.32%

react-native-browser's Introduction

react-native-browser

A full-featured web browser module for React Native apps, based on the awesome TOWebViewController

TOWebViewController

Installation

  1. Run npm install react-native-browser --save in your project directory.
  • Open your project in XCode, right click on Libraries and click Add Files to "Your Project Name"
  • Inside your node_modules, find react-native-browser and add RCTBrowser.xcodeproj to your project.
  • Add libRTCBrowser.a to Build Phases -> Link Binary With Libraries
  • Whenever you want to use it within your React code, you can: var Browser = require('react-native-browser');

Usage

Example:

import {
  processColor, // make sure to add processColor to your imports if you want to use hex colors as shown below
} from 'react-native';

// at the top of your file near the other imports
var Browser = require('react-native-browser');

...


// wherever you want to trigger a browser modal appearing
Browser.open('https://google.com/');

// OR pass in options to customize
Browser.open('https://google.com/', {
                    showUrlWhileLoading: true,
                    loadingBarTintColor: processColor('#d64bbd'),
                    navigationButtonsHidden: false,
                    showActionButton: true,
                    showDoneButton: true,
                    doneButtonTitle: 'Done',
                    showPageTitles: true,
                    disableContextualPopupMenu: false,
                    hideWebViewBoundaries: false,
                    buttonTintColor: processColor('#d64bbd'),
                    titleTintColor: processColor('#d64bbd'),
                    barTintColor: processColor('#d64bbd')
                  });

Descriptions of options and their defaults

TODOs

  • Finish adding all customization options / support callbacks
  • Accessors for webview & url requests
  • Programatic control of loading pages, closing the view, etc

License

MIT License

react-native-browser's People

Contributors

mfkp avatar skycocker avatar blaues0cke avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.