JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q58726F
  • License ISC

Custom shapes for React Native apps.

Package Exports

  • react-native-shape

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 (react-native-shape) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

Name Type Default
color String #1e90ff
rotate Int 0 (in deg)
scale Float 1

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