1.0.0 • Published 7 years ago

react-svg-creator v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

react-svg-creator

Features

  • React components to create svg shape(Regular polygon).
  • Custom style supported。

Installation

npm install react-svg-creator --save

Usage

import { GeometricSvg } from 'react-svg-creator';

ReactDOM.render(
  <GeometricSvg
    type="hexagon"
    length={100}
    strokeColor="#000"
    strokeWidth={2}
    fillColor="#fff"
    borderRadius={10} />, container);

API

PropTypeDescriptionDefault
typestring'pentagon', 'hexagon', 'octagon', 'decagon''hexagon'
startPointnumberstart point of shape path0
lengthnumberlength of shape100
borderRadiusnumberborder radius of round corner0
strokeWidthnumberstoke width of shape border0
strokeColorstringoutline color of shape'#000'
fillColorstringfill color of shape'#fff'
defaultOffsetnumberdefault offset of shape path