Skip to content

tahafatih/react-tweet-card

 
 

Repository files navigation

react-tweet-card

NPM

A Tweet Card component you can use easily in your React projects. It doesn't rely on the Twitter API but instead lets you feed in all information about the tweet you're displaying. This way you can create cards for fictional tweets or tweets that have been deleted.

🐦 Demo and documentation


Installation

npm i react-tweet-card
# or
yarn add react-tweet-card

Features

  • Responsive component
  • Component scales to fit inside any container
  • Light, dim and dark themes
  • Dark mode preference support
  • Gradient and blurred container styles
  • styled-components and emotion support
  • TypeScript support
  • Support for images in tweet
  • Support for verified and protected Twitter accounts
  • Support for @mentions in tweet
  • Support for links in tweet
  • Support for hashtags in tweet
  • Display number of replies, retweets and likes

Server-side rendering

react-tweet-card can only be rendered on the client side as it loads its CSS directly into the DOM. To make it work with SSR, try importing the package dynamically.

Design credits

Component layout is based on Tweety by Ashwin G

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 80.4%
  • CSS 12.3%
  • JavaScript 6.1%
  • HTML 1.2%