1.1.2 • Published 5 years ago

react-native-shape v1.1.2

Weekly downloads
21
License
ISC
Repository
github
Last release
5 years ago

React Native Shape

Custom shapes for React Native apps

This library is truly an inspiration from The shape of CSS and the example assets for demonstrating this library are been used from an article on CodeDaily.

Currently, this library is supporting 9 basic shapes mentioned below.

Square, Rectangle, Circle, Oval, Triangle, Trapezoid, Pentagon, Hexagon & Octagon.

Demo

demo

Installation

npm install react-native-shape

Properties

NameTypeDefault
colorString#1e90ff
rotateInt0 (in deg)
scaleFloat1

Example Usage

import React from 'react';
import { View } from 'react-native';
import { Circle, Triangle } from 'react-native-shape';

export default class App extends React.Component {
  render() {
    return (
      <View>
        <Circle />
        <Triangle color="red" scale={1.2} rotate={45} />
      </View>
    );
  }
}

Contributing

Contributions are very welcome for bug fixes & new features

License

MIT