preview-url-component

1.0.3 • Public • Published

Preview URL Component

contributions welcome npm version
https://nodei.co/npm/preview-url-component.png?downloads=true&downloadRank=true&stars=true

The react component that easily get meta tags from the target URL.

A component that you will probably want to use to show a preview of the target url.

Installation

Install preview-url-component with npm:

npm i preview-url-component

with yarn:

yarn add preview-url-component


Example

To be practical you can see live in my react application https://previewurl.surge.sh/


Usage

Add the component to the section you want to show and remember to use the parameters. That's all.

import React from 'react';
import Preview from  'preview-url-component'
 
const App = () => {
    return (
        <Preview
            url="URL_ADDRESS"
            loadingText="loading..."
            notFound="URL Not Found!"
        />
    )
}
export default App;

Params

Parameters Description
url Enter the url you want to preview. (Require)
loadingText You can change the text indicating that the data was loaded while shooting. (Default= "loading...")
notFound If there was a problem while capturing the data, you can change the not found error text. (Default= "NOT FOUND! Check to URL")

Thank you for your watching

To follow me Github - Twitter - Linkedin

Package Sidebar

Install

npm i preview-url-component

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

27.9 kB

Total Files

5

Last publish

Collaborators

  • beratbozkurt