0.0.8 • Published 4 years ago
@compai/html-to-png v0.0.8
@compai/html-to-png
Turn an HTML string into a png image.
Installation
yarn add @compai/html-to-pngUsage
import fs from 'fs'
import { render } from '@compai/html-to-png'
const HTML = `
<h1>Hello, world!</h1>
`
(async () => {
  const png = await render(HTML)
  fs.writeFileSync('test.png', png)
})()Related
OSS by Components AI.