react component which takes a tweet id in props and you'll get a tweet embed rendered once the twitter clientside API loads, nothing more
TypeScript
165
72 commits
updated Mar 28, 2023
npm i react-tweet-embed
import React from 'react'
import TweetEmbed from 'react-tweet-embed'
export const App = () => {
return <TweetEmbed tweetId="692527862369357824" />
}
You don't have to put //platform.twitter.com/widgets.js script in your index.html as this lib will put it there if twttr is not found on window.
placeholderText to be shown while the tweet is loading:
<TweetEmbed id='1186523464712146944' placeholder='Sending this tweet through space via Starlink satellite 🛰'/>
optionsKey-value pairs from the embedded tweet parameter reference:
<TweetEmbed id='783943172057694208' options={{cards: 'hidden' }}/>
<TweetEmbed id='771763270273294336' options={{theme: 'dark' }}/>
TypeScript
100.0%
react component which takes a tweet id in props and you'll get a tweet embed rendered once the twitter clientside API loads, nothing more
TypeScript
165
72 commits
updated Mar 28, 2023
npm i react-tweet-embed
import React from 'react'
import TweetEmbed from 'react-tweet-embed'
export const App = () => {
return <TweetEmbed tweetId="692527862369357824" />
}
You don't have to put //platform.twitter.com/widgets.js script in your index.html as this lib will put it there if twttr is not found on window.
placeholderText to be shown while the tweet is loading:
<TweetEmbed id='1186523464712146944' placeholder='Sending this tweet through space via Starlink satellite 🛰'/>
optionsKey-value pairs from the embedded tweet parameter reference:
<TweetEmbed id='783943172057694208' options={{cards: 'hidden' }}/>
<TweetEmbed id='771763270273294336' options={{theme: 'dark' }}/>
TypeScript
100.0%