react-roughjs
v0.1.3-alpha.0
Published
React Wrapper for [roughjs](https://github.com/pshihn/rough).
Downloads
37
Readme
React Roughjs
React Wrapper for roughjs.
Installation
yarn add react-roughjs roughjs
Usage
import * as React from 'react'
import {
RoughProvider, Rectangle, Circle,
} from 'react-roughjs'
export const App = () => (
<svg height={500} width={500}>
<RoughProvider>
<Rectangle
x={10}
y={10}
width={100}
height={100}
options={{ fill: 'red' }}
/>
<Circle
x={200}
y={60}
diameter={100}
options={{ fill: 'blue', fillStyle: 'cross-hatch' }}
/>
</RoughProvider>
</svg>
)