1 | # NativeBase [![](http://slack.nativebase.io/badge.svg)](http://slack.nativebase.io/) [![Build Status](https://travis-ci.org/GeekyAnts/NativeBase.svg?branch=master)](https://travis-ci.org/GeekyAnts/NativeBase) [![npm version](https://badge.fury.io/js/native-base.svg)](https://badge.fury.io/js/native-base) [![npm downloads](https://img.shields.io/npm/dt/native-base.svg)](https://npm-stat.com/charts.html?package=native-base&from=2016-04-01&to=2018-02-17)
|
2 |
|
3 | [![NPM](https://nodei.co/npm/native-base.png?downloads=true)](https://nodei.co/npm/native-base/)
|
4 |
|
5 | Essential cross-platform UI components for React Native
|
6 |
|
7 | Updated docs [here!](https://docs.nativebase.io/)
|
8 |
|
9 | ![Demo](https://github.com/GeekyAnts/NativeBase-KitchenSink/raw/master/screenshots/iOS.gif)
|
10 | ![Demo](https://github.com/GeekyAnts/NativeBase-KitchenSink/raw/master/screenshots/Android.gif)
|
11 |
|
12 |
|
13 | # Table of Content
|
14 |
|
15 | 1. [What is NativeBase?](#1-what-is-nativebase)
|
16 | 2. [Why NativeBase?](#2-why-nativebase)
|
17 | 3. [KitchenSink App](https://github.com/GeekyAnts/NativeBase-KitchenSink)
|
18 | 4. [Getting Started](#4-getting-started)
|
19 | 5. [Components](#5-components)
|
20 | 6. [NativeBase for Web](#6-nativebase-for-web)
|
21 | 7. [Compatibility Versions](#7-compatibility-versions)
|
22 | 8. [React Native Seed](#8-react-native-seed)
|
23 | 9. [NativeBase Market](#9-nativebase-market)
|
24 | 10. [Documentation](#10-documentation)
|
25 | 11. [Website](#11-website)
|
26 | 12. [Quick Links to NativeBase](#12-quick-links-to-nativebase)
|
27 | 13. [About the creators](#13-about-the-creators)
|
28 |
|
29 |
|
30 |
|
31 | ## 1. What is NativeBase?
|
32 | [NativeBase](https://nativebase.io/) is a sleek, ingenious and dynamic front-end framework created by passionate React Loving team at [Geekyants.com](https://geekyants.com/) to build cross platform Android & iOS mobile apps using ready to use generic components of React Native.
|
33 |
|
34 |
|
35 |
|
36 | ## 2. Why NativeBase?
|
37 | What is really great with [NativeBase](https://nativebase.io/) is that you can use shared UI cross-platform components, which will drastically increase your productivity. When using NativeBase, you can use any native third-party libraries out of the box.<br />
|
38 |
|
39 | **Recommended by** *Microsoft*
|
40 | > If you're looking to get started with React Native + CodePush, and are looking for an awesome starter kit, you should check out Native Starter Pro - [Microsoft's react-native-code-push repo](https://github.com/Microsoft/react-native-code-push#example-apps--starters)
|
41 |
|
42 | **Recommended by [Awesome React Native](https://github.com/jondot/awesome-react-native)**
|
43 | >NativeBase added into the list of [Frameworks](https://github.com/jondot/awesome-react-native#frameworks) of Awesome React Native and are also used by many other React lovers across the world.
|
44 |
|
45 |
|
46 | ## 4. Getting Started
|
47 |
|
48 | **a. Setup with pure React Native app**
|
49 |
|
50 | *Install NativeBase*
|
51 |
|
52 | ```js
|
53 | npm install native-base --save
|
54 | ```
|
55 | *Install Peer Dependencies*<br />
|
56 | The peer dependencies included from any npm packages does not automatically get installed. Your application will not depend on it explicitly.
|
57 |
|
58 | ```js
|
59 | react-native link
|
60 | ```
|
61 |
|
62 | You've successfully setup [NativeBase](https://nativebase.io/) with your [React Native](https://facebook.github.io/react-native/) app. Your React Native app is now all set to run on iOS and Android simulator.
|
63 |
|
64 |
|
65 | **b. Setup with CRNA**
|
66 |
|
67 | *Create React Native project using the CRNA cli.* <br />
|
68 | CRNA helps you make React Native apps with no build configuration. Create React App works on macOS, Windows, and Linux. <br />
|
69 | Refer this link for additional information [CRNA](https://github.com/react-community/create-react-native-app)
|
70 |
|
71 | *Install NativeBase*
|
72 | ```js
|
73 | npm install native-base --save
|
74 | ```
|
75 | *Install @expo/vector-icons*
|
76 | ```js
|
77 | npm install @expo/vector-icons --save
|
78 | ```
|
79 | <br />
|
80 |
|
81 | **Note** <br />
|
82 | [NativeBase](https://nativebase.io/) uses some custom fonts that can be loaded using **loadAsync** function. Check out [this](https://docs.expo.io/versions/latest/sdk/font#expofontloadasyncobject) expo link.
|
83 | <br />
|
84 | Syntax <br />
|
85 | ```js
|
86 | async componentWillMount() {
|
87 | await Expo.Font.loadAsync({
|
88 | 'Roboto': require('native-base/Fonts/Roboto.ttf'),
|
89 | 'Roboto_medium': require('native-base/Fonts/Roboto_medium.ttf'),
|
90 | 'Ionicons': require('@expo/vector-icons/fonts/Ionicons.ttf'),
|
91 | });
|
92 | ```
|
93 | <br />
|
94 |
|
95 | Check out the [KitchenSink](https://expo.io/@geekyants/nativebasekitchensink) with CRNA for an example of the implementation.<br />
|
96 | Find the [KitchenSink repo here](https://github.com/GeekyAnts/NativeBase-KitchenSink/tree/CRNA)
|
97 |
|
98 | **c. Setup with ignite-native-base-boilerplate**
|
99 |
|
100 | You can run the following command to create the boilerplate, provided you have [Ignite CLI](https://github.com/infinitered/ignite) installed.
|
101 |
|
102 | ```
|
103 | ignite new appname --boilerplate native-base-boilerplate
|
104 | ```
|
105 | Go to app location
|
106 | ```sh
|
107 | cd appname
|
108 | ```
|
109 | For iOS run
|
110 | ```sh
|
111 | react-native run-ios
|
112 | ```
|
113 | For Android run
|
114 | ```sh
|
115 | react-native run-android
|
116 | ```
|
117 | Refer [ignite-native-base-boilerplate](https://github.com/GeekyAnts/ignite-native-base-boilerplate) page for additional information
|
118 |
|
119 | ## 5. Components
|
120 |
|
121 | [NativeBase](https://nativebase.io/) is made from effective building blocks referred to as components. The Components are constructed in pure [React Native](https://github.com/facebook/react-native) platform along with some JavaScript functionality with rich set of customisable properties. These components allow you to quickly build the perfect interface.
|
122 |
|
123 | ## 6. NativeBase for Web
|
124 |
|
125 | NativeBase is now available for React web lovers. Check the [demo](https://nativebase.io/kitchen-sink-web-app/)
|
126 | Find the repo [here](https://github.com/GeekyAnts/NativeBase-KitchenSink/tree/web-support)
|
127 |
|
128 |
|
129 | ## 7. Compatibility Versions
|
130 |
|
131 | | NativeBase | React Native |
|
132 | |----------|-------------|
|
133 | | v0.1.1 | v0.22 to v0.23 |
|
134 | | v0.2.0 to v0.3.1 | v0.24 to v0.25 |
|
135 | | v0.4.6 to v0.4.9 | v0.26.0 - v0.27.1 |
|
136 | | v0.5.0 to v0.5.15 | v0.26.0 - v0.37.0 |
|
137 | | v0.5.16 to v0.5.20 | v0.38.0 - v0.39.0 |
|
138 | | v2.0.0-alpha1 to v2.1.3 | v0.38.0 to v0.43.0 |
|
139 | | v2.1.4 to v2.1.5 | v0.44.0 to v0.45.0 |
|
140 | | v2.2.0 | v0.44.0 to v0.45.0 |
|
141 | | v2.2.1 | v0.46.0 and above |
|
142 | | v2.3.0 to 2.6.1 | v0.46.0 and above *(does not support React 16.0.0-alpha.13)*|
|
143 | | v2.7.0 | v0.56.0 and above |
|
144 |
|
145 | ## 8. [React Native Seed](https://reactnativeseed.com/)
|
146 |
|
147 |
|
148 | React Native Seed provides you React Native starter kits for your base app with the technologies that you love.
|
149 |
|
150 | Based on the feedback we received from our users, people had trouble sorting out the right boilerplate for them with the desired technologies and contacted us to enquire. We realized that many people were particular about the technologies they want in the app and that a minimal, neat solution was required to solve this, and hence, React Native Seed.
|
151 |
|
152 | React Native Seed is for learners and professionals alike, those who want to experiment, learn all aspects and those who already know enough, just want a starter kit to quickly start working on their project.
|
153 |
|
154 |
|
155 | ## 9. NativeBase Market
|
156 |
|
157 | Having tried with the free version, [Native Starter Kit](https://github.com/start-react/native-starter-kit) and appreciate our product?
|
158 |
|
159 | Get on the mobile fast track with the featured apps of [NativeBase](https://nativebase.io/), to build high-quality iOS and Android mobile apps.<br />
|
160 | A [marketplace](https://market.nativebase.io/) for premium React Native app themes to build high-quality iOS and Android mobile apps. <br />
|
161 |
|
162 | ## 10. Documentation
|
163 |
|
164 | Go through [NativeBase Docs](https://docs.nativebase.io/) to play with [NativeBase](https://nativebase.io/).
|
165 |
|
166 |
|
167 |
|
168 | ## 11. Website
|
169 | [https://nativebase.io/](https://nativebase.io/)
|
170 |
|
171 |
|
172 |
|
173 | ## 12. Quick Links to NativeBase
|
174 |
|
175 | * [NativeBase Documentation](https://docs.nativebase.io/)
|
176 | * [NativeBase Blog](https://blog.nativebase.io)
|
177 | * [NativeBase on Twitter](https://twitter.com/NativeBaseIO)
|
178 | * [NativeBase on FaceBook](https://www.facebook.com/nativebaseio/)
|
179 |
|
180 |
|
181 | ## 13. About the creators
|
182 |
|
183 | We are [GeekyAnts](https://geekyants.com/), a startup based in Bangalore, India with 50+ developers in strength. We have been very active in the React / React Native community where we have developed [StrapUI](https://www.strapui.com/) and [StartReact](https://startreact.com/). Our other products include [StartLaravel](http://startlaravel.com) and [StartAngular](http://startangular.com).
|
184 |
|
185 | Another major project by us is [BuilderX](https://builderx.io/?utm_source=github&utm_medium=nativebase&utm_campaign=nativebase), a screen design tool which codes React Native for you.
|