Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/capaj/react-tweet-embed

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
https://github.com/capaj/react-tweet-embed

hacktoberfest react reactjs twitter

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# react-tweet-embed

## Install

```
npm i react-tweet-embed
```

## Quickstart [![Edit react-tweet-embed](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/74rn3r9k0?fontsize=14)

```tsx
import React from 'react'
import TweetEmbed from 'react-tweet-embed'

export const App = () => {
return
}
```

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`.

## Props

### `placeholder`

Text to be shown while the tweet is loading:
```html

```

### `options`

Key-value pairs from the [embedded tweet parameter reference](https://developer.twitter.com/en/docs/twitter-for-websites/embedded-tweets/guides/embedded-tweet-parameter-reference):

```html

```