X Post
manifest-ui/x-postFreeBlock
X (Twitter) post card with engagement metrics.
Install it
npx shadcn@latest add https://ui.manifest.build/r/x-post.jsonSource
1"use client"23import { Heart, MessageCircle, Repeat2, Share, Bookmark } from "lucide-react"4import { demoXPost } from './demo/social'56/**7 * ═══════════════════════════════════════════════════════════════════════════8 * XPostProps9 * ═══════════════════════════════════════════════════════════════════════════10 *11 * Props for the XPost component, which displays an X (Twitter)-style post12 * with author info, content, and engagement metrics.13 */14export interface XPostProps {15 data?: {16 /** Author's display name. */17 author?: string18 /** Author's handle/username (without the @ symbol). */19 username?: string20 /** Avatar letter fallback or image URL for the profile picture. */21 avatar?: string22 /** Post text content. */23 content?: string24 /** Time since posted (e.g., "2h"). */25 time?: string26 /** Formatted like count (e.g., "1.2K"). */27 likes?: string28 /** Formatted retweet/repost count. */29 retweets?: string30 /** Formatted reply count. */31 replies?: string32 /** Formatted view count (e.g., "45.2K"). */33 views?: string34 /** Whether the author has a verified badge. */35 verified?: boolean36 }37}3839/**40 * An X (Twitter) post embed component with engagement metrics.41 * Displays author info, content, and interactive action buttons.42 *43 * Features:44 * - Author avatar, name, and username45 * - Verified badge support46 * - Engagement metrics (likes, retweets, replies, views)47 * - Interactive action buttons (reply, retweet, like, bookmark, share)48 * - Time display49 *50 * @component51 * @example52 * ```tsx53 * <XPost54 * data={{55 * author: "John Doe",56 * username: "johndoe",57 * avatar: "J",58 * content: "Hello world! This is my first post.",59 * time: "2h",60 * likes: "1.2K",61 * retweets: "234",62 * replies: "56",63 * views: "45.2K",64 * verified: true65 * }}66 * />67 * ```68 */69export function XPost({ data }: XPostProps) {70 const resolved: NonNullable<XPostProps['data']> = data ?? demoXPost71 const author = resolved?.author72 const username = resolved?.username73 const avatar = resolved?.avatar74 const content = resolved?.content75 const time = resolved?.time76 const likes = resolved?.likes77// … truncated
What it pulls in
npm packages
Files it writes
More from Manifest UI
All 32 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Amount Inputamount-input | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Chat Conversationchat-conversation | Manifest UI | Blocks | Free | 1 dep · 3 files | |
| Contact Formcontact-form | Manifest UI | Blocks | Free | 1 dep · 3 files | |
| Date & Time Pickerdate-time-picker | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Cardevent-card | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Confirmationevent-confirmation | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Detailevent-detail | Manifest UI | Blocks | Free | 3 deps · 2 files | |
| Event Listevent-list | Manifest UI | Blocks | Free | 3 deps · 2 files |
