react-html2canvas

1.0.1 • Public • Published

React with Html2canvas

thanks to niklasvh for create amazing packages

Installation

npm i react-html2canvas

Basic Usage

import React, { useRef } from 'react'
import ReactHtml2Canvas from 'react-html2canvas'

const ref = useRef()

const handleClick = () => {
    ref.current.handleDownload();
}

<ReactHtml2Canvas id="example" ref={ref}>
  <p>hello</p>
</ReactHtml2Canvas>
<button onClick={handleClick}>Download</button>

Readme

Keywords

Package Sidebar

Install

npm i react-html2canvas

Weekly Downloads

33

Version

1.0.1

License

MIT

Unpacked Size

437 kB

Total Files

9

Last publish

Collaborators

  • mzulfanw