Skip to content
Magic UI SolidMagicUI Solid

Tweet Card

A card that displays a tweet with the author's name, handle, and profile picture.

@/demos/TweetCardDemo.tsx
import { ClientTweetCard } from '@/registry/magicui/client-tweet-card'
export function TweetCardDemo() {
return <ClientTweetCard id="1668408059125702661" />
}
Terminal window
pnpm dlx shadcn@latest add @magicui-solid/client-tweet-card
import { ClientTweetCard } from '@/components/magicui/client-tweet-card'
<ClientTweetCard id="1441032681968212480" />
@/demos/TweetCardImagesDemo.tsx
import { ClientTweetCard } from '@/registry/magicui/client-tweet-card'
export function TweetCardImagesDemo() {
return <ClientTweetCard id="1678577280489234432" class="shadow-2xl" />
}
@/demos/TweetCardMetaPreviewDemo.tsx
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