Tweet Card
A card that displays a tweet with the author's name, handle, and profile picture.
import { ClientTweetCard } from '@/registry/magicui/client-tweet-card'
export function TweetCardDemo() { return <ClientTweetCard id="1668408059125702661" />}Installation
Section titled “Installation”pnpm dlx shadcn@latest add @magicui-solid/client-tweet-cardbunx shadcn@latest add @magicui-solid/client-tweet-cardyarn dlx shadcn@latest add @magicui-solid/client-tweet-cardnpx shadcn@latest add @magicui-solid/client-tweet-cardImport
Section titled “Import”import { ClientTweetCard } from '@/components/magicui/client-tweet-card'<ClientTweetCard id="1441032681968212480" />Examples
Section titled “Examples”Tweet Card With Image Carousel
Section titled “Tweet Card With Image Carousel”import { ClientTweetCard } from '@/registry/magicui/client-tweet-card'
export function TweetCardImagesDemo() { return <ClientTweetCard id="1678577280489234432" class="shadow-2xl" />}Tweet Card With Meta URL Preview
Section titled “Tweet Card With Meta URL Preview”import { ClientTweetCard } from '@/registry/magicui/client-tweet-card'
export function TweetCardMetaPreviewDemo() { return <ClientTweetCard id="1675849118445436929" class="shadow-2xl" />}| Prop | Type | Default | Description |
|---|---|---|---|
id |
string |
- |
The id of the tweet to display. |
fallback |
JSX.Element |
TweetSkeleton() |
Loading skeleton shown while fetching. |
apiUrl |
string |
- |
Custom API URL to fetch the tweet from. |
fetchOptions |
RequestInit |
- |
Options passed to the underlying fetch. |
onError |
Function |
- |
Callback invoked when fetching the tweet fails. |
Original:
magicui.design/docs/components/tweet-card