1.1.0 • Published 2 years ago

react-serp-preview v1.1.0

Weekly downloads
254
License
MIT
Repository
github
Last release
2 years ago

React SERP Preview

Visualise how your website will appear in the Google search results.

Live demo

Preview

  • Same look as Google search results
  • Titles are truncated at 600 pixels (by default)
  • Description is truncated around 300 characters

Installation

yarn add react-serp-preview

Usage

import SerpPreview from 'react-serp-preview';

...

<SerpPreview 
    title="Example Domain"
    metaDescription={`Example Domain. This domain is established to be used for 
        illustrative examples in documents. You may use this domain in examples 
        without prior coordination or asking for permission.`}
    url="https://example.com/"
/>
PropTypeDescription
titlestring(required) Website title
metaDescriptionstring(required) Website description
urlstring(required) Website URL
widthnumber(default: 600) Width of the preview