GithubHelp home page GithubHelp logo

vilashcj / react-native-ios-kit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from callstack/react-native-ios-kit

0.0 0.0 0.0 13.78 MB

The missing React Native UI Kit for iOS

Home Page: https://callstack.github.io/react-native-ios-kit/

License: MIT License

JavaScript 97.93% CSS 2.07%

react-native-ios-kit's Introduction

react-native-ios-kit


The missing React Native UI Kit for iOS.


Build and test Version MIT License

PRs Welcome Chat tweet Sponsored by Callstack

Features

You can find documentation with all list of features and components here

Try it out

Run the example app with Expo to see it in action.

The source code for the examples are under the /example folder.

Getting Started

Installation

Open a Terminal in your project's folder and run

  yarn add react-native-ios-kit react-native-vector-icons

After installation, you'll need to link react-native-vector-icons.

Usage

Wrap your root component in ThemeProvider from react-native-ios-kit.

It's a good idea to wrap the component which is passed to AppRegistry.registerComponent.

Example:

import * as React from 'react';
import { AppRegistry } from 'react-native';
import { ThemeProvider } from 'react-native-ios-kit';
import App from './src/App';

function Main() {
  return (
    <ThemeProvider>
      <App />
    </ThemeProvider>
  );
}

AppRegistry.registerComponent('main', () => Main);

The ThemeProvider component provides the theme to all the components in the framework. It also acts as a portal to components which need to be rendered at the top level.

Customization

Main theme for application

You can provide a custom theme to customize the colors, fonts etc. with the ThemeProvider component. Check the Theme Type to see what customization options are supported.

Example:

import * as React from 'react';
import { AppRegistry } from 'react-native';
import { DefaultTheme, ThemeProvider } from 'react-native-ios-kit';
import color from 'color';
import App from './src/App';

const theme = {
  ...DefaultTheme,
  primaryColor: 'tomato',
  primaryLightColor: color('tomato')
    .lighten(0.2)
    .rgb()
    .string(),
  disabledColor: 'yellow',
};

function Main() {
  return (
    <ThemeProvider theme={theme}>
      <App />
    </ThemeProvider>
  );
}

Customization per component

You can also customize theme per one component by using theme prop.

Example:

  <Icon
    name="ios-people"
    theme={{
      primaryColor: 'green'
    }}
  >

This code will change icon color to green

Documentation

Check the components and their usage in our documentation.

Contributing

Read the contribution guidelines before contributing.

Made with ❤️ at Callstack

react-native-ios-kit is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. Callstack is a group of React and React Native geeks, contact us at [email protected] if you need any help with these or just want to say hi!

react-native-ios-kit's People

Contributors

adamtrz avatar souhe avatar dependabot[bot] avatar lukewalczak avatar gawrysiak avatar marchenk0va avatar berkaybeyaz1 avatar alimek avatar imranolas avatar jono-allen avatar zamotany avatar satya164 avatar katallaxie avatar wojteg1337 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.