# image-from-html

> To transform a html code to canvas or image fast.

Latest version **0.0.4** (published 2020-02-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install image-from-html
pnpm add image-from-html
yarn add image-from-html
bun add image-from-html
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2020-02-29 |
| First published | 2020-02-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Eder Taveira |
| Maintainers | edertaveira |
| Keywords | image, canvas, tranform, html |

## Links

- npm: https://www.npmjs.com/package/image-from-html
- Repository: https://github.com/edertaveira/image-from-html
- Homepage: https://github.com/edertaveira/image-from-html#readme
- Issues: https://github.com/edertaveira/image-from-html/issues
- npm.io page: https://npm.io/package/image-from-html

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2020-02-29
- 0.0.3 — 2020-02-29
- 0.0.2 — 2020-02-29
- 0.0.1 — 2020-02-29

## README

### Description

Image from HTML is a simple form to transform a HTML element to canvas and image. 

### Installing

```
$ npm install image-from-html
```

or

```
$ yarn add image-from-html
```

### Using

```
import imageFromHtml from 'image-from-html';
imageFromHtml.toCanvas('test');
```

- The param `test` would be the HTML element ID that you need transform.

### React Example

```
import React, { useEffect } from "react";
import imageFromHtml from "image-from-html";

export default function App() {
  useEffect(() => {
    imageFromHtml.toCanvas("test");
  }, []);

  return (
    <div className="App" id="test">
      <h1>Title to Image</h1>
      <h2>Subtitle here!</h2>
    </div>
  );
}

```

---
_Source: https://npm.io/package/image-from-html · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
