react-roughjs
TypeScript icon, indicating that this package has built-in type declarations

0.1.3-alpha.0 • Public • Published

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>
)

Readme

Keywords

none

Package Sidebar

Install

npm i react-roughjs

Weekly Downloads

7

Version

0.1.3-alpha.0

License

MIT

Unpacked Size

155 kB

Total Files

43

Last publish

Collaborators

  • beizhedenglong