Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including react-tweet-embed with all npm packages installed. Try it out:

require("react/package.json"); // react is a peer dependency. var reactTweetEmbed = require("react-tweet-embed")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

react-tweet-embed v1.1.1

react component that you supply tweet id and you'll get a tweet embed back, nothing more



npm i react-tweet-embed


import TweetEmbed from 'react-tweet-embed'

<TweetEmbed id='692527862369357824' />

You don't have to put // script in your index.html as this lib will put it there if twttr is not found on window.

Using Options

<TweetEmbed id='783943172057694208' options={{cards: 'hidden' }}/>
<TweetEmbed id='771763270273294336' options={{theme: 'dark' }}/>

Embedded-Tweet Options Reference:

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free