Git Product home page Git Product logo

panza's Introduction

panza

Panza (named after Sancho Panza, from Don Quixote), is a collection of stateless, functional ui-components for react-native, and heavily inspired by the excellent rebass library. 

The goal with Panza is to provide a set of commonly used (mostly) functional ui components for react-native, that work well in both android and iOS environments. These components should look nice out of the box, but still offer a high degree of customization. This is achieved primarily through the use of composition. Each component is comprised of smaller components including a Base component, which provides some nice shorthands to transform props into styles based upon a global configuration. A component like TouchableRow may suit your needs eighty percent of the time, but in cases where you need something a bit more custom, you can construct your own row using TouchableRowCell, PrimaryText, SecondaryText, RowImage, Base, ArrowRightIcon, and any other components that you’d like.

You can see Panza in production with Payback, an app that manages shared expenses between individuals and groups.

Getting Started

$ npm i panza --save
$ npm i react-native-vector-icons --save
$ rnpm link react-native-vector-icons

Components

Inputs

Rows

Navigation

Pages

Buttons

Text

Images

Icons

  • Icon
  • TouchableIcon
  • PlusIcon
  • ArrowRightIcon
  • CloseIcon
  • BackIcon
  • SearchIcon
  • MoreIcon

Base Components

Customize

You can override parts of the global configuration to provide custom colours, font sizes, scales, etc.

import { config } from 'panza'

class App extends React.Component {

  static childContextTypes = {
    panza: PropTypes.object
  }

  getChildContext() {
    panza: this.state.styles
  }

  state = {
    styles: {
      colors: Object.assign(
        {},
        config.colors,
        { primary: config.colors.red } // change the primary color from blue to red
      )
    }
  }

  // ... render your app
}

Example

You can install the example application contained within this repository.

$ git clone https://github.com/bmcmahen/panza.git
$ cd panza && npm install
$ react-native run-ios
$ react-native run-android

License

MIT

panza's People

Contributors

bmcmahen avatar meta-dreamer avatar levito 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.