preview-link-js

2.1.2 • Public • Published

preview-link-js

NPM module to scrape site data and generate a link preview popup

      

[Try it out] This package allows you to easily generate link preview popups. Retrieving site data from the browser side is blocked (Read More: CORS), so you must use node-link-scraper with this component.

Install

npm i preview-link-js

Import component and include your scraper link:

import PreviewLink from 'preview-link-js'
...
<PreviewLink scraper="https://node-link-scraper.herokuapp.com/" ...></PreviewLink>

Usage

  • Include your link via href, and your display text as innerHTML
<PreviewLink href="https://www.npmjs.com/package/preview-link-js"> preview-link-js </PreviewLink>
  • You can also edit the class and style fields
<PreviewLink class="preview-link-js" style={{ fontWeight:"500" }}> preview-link-js </PreviewLink>

License

MIT License

Package Sidebar

Install

npm i preview-link-js

Weekly Downloads

3

Version

2.1.2

License

MIT

Unpacked Size

16.2 kB

Total Files

6

Last publish

Collaborators

  • rishabr17