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

0.0.6 • Public • Published

react-canvas-sign

React compoent to use canvas ​

Installation

npm i react-canvas-sign

Usage

import { useRef } from "react";
import "./App.css";
import Canvas from "react-canvas-sign";
// import Canvas from "../dist/react-canvas.es";

function App() {
  const canvasRef = useRef(null);

  return (
    <div className="App">
      <Canvas
        ref={canvasRef}
        height={400}
        width={800}
        contextProps={{}}
      ></Canvas>
    </div>
  );
}

export default App;

Props

prop type default
contextProps object
width number
height number
className string

Ref Props

props desc
canvasRef canvas ref
undo() undo operation
clear() clear operation
save() save as png image

Readme

Keywords

none

Package Sidebar

Install

npm i react-canvas-sign

Weekly Downloads

0

Version

0.0.6

License

none

Unpacked Size

10.2 kB

Total Files

5

Last publish

Collaborators

  • firengxuan