Skip to content

mzulfanw/react-html2canvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

Releases

No releases published

Packages

No packages published