JSPM

native-base

3.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 68315
  • Score
    100M100P100Q19454F
  • License Apache-2.0

Essential cross-platform UI components for React Native

Package Exports

  • native-base

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (native-base) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Nativebase Logo

Financial Contributors on Open Collective Build Status npm version npm downloads

NativeBase is a mobile-first, accessible component library for building a consistent design system across android, iOS & web.

Website
Documentation

Table of Contents

  1. Introduction
  2. Motivation
  3. Features
  4. Dependencies
  5. Installation & Setup
  6. Components
  7. Examples
  8. KitchenSink App
  9. Tech Stack
  10. Compatible Versions
  11. Contributors
  12. Changelog
  13. Community
  14. License

1. Introduction?

NativeBase is a mobile-first, component library for React & React Native. Version 3.0 ships with complete ARIA integration, support for utility props and nearly 40 components that are consistent across Android, iOS and Web. Fast-track your dev process with NativeBase 3.0.

Recommended by Awesome React Native

NativeBase was added to the list of Frameworks of Awesome React Native and it is used by numerous React lovers across the world.

2. Motivation

Building with React Native from scratch is a tedious process with multiple steps such as adding styling, interactions, state management, responsiveness, accessibility, etc. We wanted to build and ship accessible, high-quality apps quickly.

Our inspirations include Material UI, Chakra UI, Ant Design, Braid Design System, Bootstrap, TailwindCSS & Flutter.

3. Features

Out of the Box Accessibility

Integrated with React ARIA and React Native ARIA, which provides React hooks. This enables you to build accessible design systems in no time.

Out of the box accessibility

Supporting Utility Props

Powered by Styled System so you can rapidly build custom UI components with constraint-based utility style props.

Rich Component Library

NativeBase offers around 40 components so you can build seamlessly. It includes button, checkbox, flex, stack and more.

Highly Themeable

Themeability is one of the core elements of NativeBase. You can customise your app theme and component styles to your heart's content.

Nativebase Logo

Available for Both Mobile and Web

NativeBase 3.0 is powered by React Native Web so you can build consistent UIs across Web, Android and iOS.

Responsiveness Made Easy

Instead of manually adding responsiveness, NativeBase 3.0 allows you to provide object and array values to add responsive styles.

Now with Dark Mode

Building apps with a dark mode setting just got a whole lot easier. NativeBase is now optimised for light and dark modes.

4. Dependencies

React Native, Expo

5. Installation & Setup

To start using NativeBase components in your native apps, create a new React Native project. Expo is a great starting point so let's set it up, install NativeBase using yarn/npm and add all the peer dependencies. To get NativeBase running onto your native apps, install it using npm or yarn.

Setup with React Native

react-native init AwesomeNativeBase
cd AwesomeNativeBase

Install NativeBase

# using yarn
yarn add native-base@next react-native-svg styled-components styled-system react-native-safe-area-context
# using npm
npm install native-base@next react-native-svg styled-components styled-system react-native-safe-area-context

Run pod install

cd ios/
pod install

You've successfully setup NativeBase with your React Native app. Your React Native app is ready to run on iOS and Android devices.

Setup with Expo

Expo helps you to create universal (iOS, Android and Web) React Native apps with no build configuration.

Install NativeBase

# using yarn
yarn add native-base@next styled-components styled-system
expo install react-native-svg
expo install react-native-safe-area-context
# using npm
npm install native-base@next styled-components styled-system
expo install react-native-svg
expo install react-native-safe-area-context

Setup for Next.js with Expo for Web

# using yarn
yarn add native-base@next react-native-svg @expo/vector-icons styled-components styled-system
# using npm
npm i native-base@next react-native-svg @expo/vector-icons styled-components styled-system

By default Next.js doesn't support static assets like an Expo project. Because this is the intended functionality of Next.js, @expo/next-adapter doesn't add font support by default. If you want to use libraries like expo-font, @expo/vector-icons, you'll need to change a few things.

yarn add next-fonts

Wrap the font method with the Expo method in your next.config.js:

const { withExpo } = require('@expo/next-adapter');
const withFonts = require('next-fonts');

module.exports = withExpo(
  withFonts({
    projectRoot: __dirname,
  })
);

The order is important because Expo can mix in the location of vector icons to the existing font loader.Now restart your project and you should be able to load fonts!

6. Components

NativeBase 3.0 is a rich component library with nearly 40 components.

7. Examples

Check out the Login Screen example

8. KitchenSink App

Kitchen Sink is a comprehensive demo app showcasing all the NativeBase components in action. It includes buttons, forms, icons, etc.

Kitchensink App gif Kitchensink App QR code

9. Tech Stack

JavaScript, React Native, Styled System

10. Compatible Versions

NativeBase React Native
v0.1.1 v0.22 to v0.23
v0.2.0 to v0.3.1 v0.24 to v0.25
v0.4.6 to v0.4.9 v0.26.0 - v0.27.1
v0.5.0 to v0.5.15 v0.26.0 - v0.37.0
v0.5.16 to v0.5.20 v0.38.0 - v0.39.0
v2.0.0-alpha1 to v2.1.3 v0.38.0 to v0.43.0
v2.1.4 to v2.1.5 v0.44.0 to v0.45.0
v2.2.0 v0.44.0 to v0.45.0
v2.2.1 v0.46.0 and above
v2.3.0 to 2.6.1 v0.46.0 and above (does not support React 16.0.0-alpha.13)
v2.7.0 v0.56.0 and above
v3.0.0-next.36 to v3.0.0-next-41 v0.63.0 and above

11. Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

12. Changelog

Check out the changelog in the official documentation

13. Community

14. License

Licensed under the MIT License, Copyright © 2020 GeekyAnts. See LICENSE for more information.