New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-shapes

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-shapes

React shapes.

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
81
-35.2%
Maintainers
1
Weekly downloads
 
Created
Source

React shapes

React shapes uses svg to draw basic shapes.

  • Rectangle
  • Circle
  • Ellipse
  • Line
  • PolyLine
  • CornerBox (experimental)
  • Triangle (experimental)

Demo & Examples

Live demo

To build the examples locally, run:

npm install
gulp dev

Then open localhost:8000 in a browser.

Installation

The easiest way to use this component is to install it from NPM and include it in your own React build process (using Browserify, Webpack, etc).

You can also use the standalone build by including dist/react-shapes.js in your page. If you use this, make sure you have already included React, and it is available as a global variable.

npm install react-shapes --save

Usage

import {Rectangle, Circle, Ellipse, Line, Polyline, CornerBox, Triangle} from 'react-shapes';

<Rectangle width={100} height={100} fill={{color:'#2409ba'}} stroke={{color:'#E65243'}} strokeWidth={3} />
<Circle r={50} fill={{color:'#2409ba'}} stroke={{color:'#E65243'}} strokeWidth={3} />
<Ellipse rx={300} ry={100} fill={{color:'#2409ba'}} stroke={{color:'#E65243'}} strokeWidth={3} />
<Line x1={25} x2={350} y1={25} y2={350}  stroke={{color:'#E65243'}} strokeWidth={3} />
<Polyline points='25,25 25,350 500,350 500,500 305,250 20,15' fill={{color:'#2409ba'}} stroke={{color:'#E65243'}} strokeWidth={3} />
<CornerBox size={400} width={150} orientation='topLeft' fill={{color:'#2409ba'}} stroke={{color:'#E65243'}}strokeWidth={3} />
<Triangle width={150} height={150} fill={{color:'#2409ba'}} stroke={{color:'#E65243'}} strokeWidth={3} />

Properties

See the demo.

Notes

License

MIT. Copyright (c) 2015 Roman Samec

Keywords

react

FAQs

Package last updated on 29 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts