kverrna / react-instagram-embed

React embedding Instagram posts component

Home Page:https://sugarshin.github.io/react-instagram-embed/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-instagram-embed

CircleCI Dependency Status Devdependency Status npm version License

React embedding Instagram posts component

yarn add react-instagram-embed

# or

npm i react-instagram-embed

Live demo

Usage

import InstagramEmbed from 'react-instagram-embed'

<InstagramEmbed
  url='https://instagr.am/p/Zw9o4/'
  maxWidth={320}
  hideCaption={false}
  containerTagName='div'
  protocol=''
  injectScript
  onLoading={() => {}}
  onSuccess={() => {}}
  onAfterRender={() => {}}
  onFailure={() => {}}
/>

props

  • url {String} Instagram URL. Required
  • maxWidth {Number} Max width. Minimum size is 320. Default undefined
  • hideCaption {Boolean} Default false
  • containerTagName {String} Default 'div'
  • protocol {String} Instagram API script protocol. Default '' same as current protocol
    • This property needed if you use device's file system, for example, Electron, Cordova apps
  • injectScript {Boolean} Default true
  • onLoading {Function}
  • onSuccess {Function}
  • onAfterRender {Function}
  • onFailure {Function}

License

MIT

© sugarshin

About

React embedding Instagram posts component

https://sugarshin.github.io/react-instagram-embed/


Languages

Language:JavaScript 89.6%Language:CSS 7.5%Language:Shell 2.9%