@s-ui/react-script-json-ld

> Small script loader for structured data (json+ld)

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@s-ui/react-script-json-ld
1.4.0a year ago4 years agoMinified + gzip package size for @s-ui/react-script-json-ld in KB

Readme

ScriptJsonLD
Small script loader for structured data (json+ld)

Installation

$ npm install @s-ui/react-script-json-ld

Usage

Basic usage

import ScriptJsonLD from '@s-ui/react-script-json-ld'

const autoDealerStructuredData = {
  '@context': 'http://schema.org',
  '@type': 'AutoDealer',
  name: 'Dealer name',
  address: {
    '@type': 'PostalAddress',
    streetAddress: 'Avda. Maresme, 133',
    postalCode: '08302',
    addressLocality: 'MatarĂ³'
  },
  image:
    'https://a.ccdn.es/coches/store_images_profesionales/123456_13032018103554.jpg',
  telephone: ['123456789'],
  geo: {
    '@type': 'GeoCoordinates',
    latitude: '41.53194',
    longitude: '2.442895'
  }
}

return (<ScriptJsonLD json={autoDealerStructuredData} />)

Find full description and more examples in the demo page.