Client Tweet Card
magicui/client-tweet-cardFreeComponent
A client-side version of the tweet card that displays a tweet with the author's name, handle, and profile picture.
Install it
npx shadcn@latest add https://magicui.design/r/client-tweet-card.jsonSource
1"use client"23import { useTweet, type TweetProps } from "react-tweet"45import {6 MagicTweet,7 TweetNotFound,8 TweetSkeleton,9} from "@/registry/magicui/tweet-card"1011export const ClientTweetCard = ({12 id,13 apiUrl,14 fallback = <TweetSkeleton />,15 components,16 fetchOptions,17 onError,18 ...props19}: TweetProps & { className?: string }) => {20 const { data, error, isLoading } = useTweet(id, apiUrl, fetchOptions)2122 if (isLoading) return fallback23 if (error || !data) {24 const NotFound = components?.TweetNotFound ?? TweetNotFound25 return <NotFound error={onError ? onError(error) : error} />26 }2728 return <MagicTweet tweet={data} {...props} />29}
What it pulls in
npm packages
Files it writes
More from magicui
All 247 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Androidandroid | magicui | Components | Free | no deps | |
| Animated Beamanimated-beam | magicui | Components | Free | 1 dep | |
| Animated Circular Progress Baranimated-circular-progress-bar | magicui | Components | Free | no deps | |
| Animated Gradient Textanimated-gradient-text | magicui | Components | Free | no deps | |
| Animated Grid Patternanimated-grid-pattern | magicui | Components | Free | 1 dep | |
| Animated Listanimated-list | magicui | Components | Free | 1 dep | |
| Animated Shiny Textanimated-shiny-text | magicui | Components | Free | no deps | |
| Theme Toggleranimated-theme-toggler | magicui | Components | Free | 1 dep |
