Tweet card
Also called tweet embed, social post card, or embedded post
A card styled like a social media post, with avatar, name, handle, text, and counts, used on landing pages to show what real users say.
type Post = {
url: string;
name: string;
handle: string;
avatar: string;
verified?: boolean;
text: string;
image?: string;
date: string;
replies: number;
likes: number;
};
const compact = new Intl.NumberFormat('en-US', { notation: 'compact' });
// Rendered from your own data, so it loads with the page and follows your theme.
export function TweetCard({ post }: { post: Post }) {
return (
<a
href={post.url}
className='block w-[420px] rounded-2xl border bg-background p-4 transition hover:shadow-lg motion-safe:hover:-translate-y-0.5'
>
<div className='flex items-center gap-3'>
<img
src={post.avatar}
alt={post.name}
className='size-10 rounded-full'
/>
<div className='min-w-0 text-sm leading-tight'>
<p className='flex items-center gap-1 font-semibold'>
{post.name}
{post.verified && (
<svg
viewBox='0 0 24 24'
role='img'
aria-label='Verified'
className='size-4'
>
<circle cx='12' cy='12' r='11' className='fill-blue-500' />
<path
d='m7.5 12 3 3 6-6'
className='fill-none stroke-white stroke-2'
/>
</svg>
)}
</p>
<p className='text-muted-foreground'>@{post.handle}</p>
</div>
</div>
<p className='mt-3 text-[15px] leading-snug whitespace-pre-line'>
{post.text}
</p>
{post.image && (
// A fixed aspect ratio reserves the space before the image loads.
<img
src={post.image}
alt=''
className='mt-3 aspect-video w-full rounded-xl object-cover'
/>
)}
<div className='mt-3 flex gap-4 text-sm text-muted-foreground tabular-nums'>
<time>{post.date}</time>
<span>{compact.format(post.replies)} replies</span>
<span>{compact.format(post.likes)} likes</span>
</div>
</a>
);
}Build a static TweetCard component for the testimonials section: a 420px wide card with 16px corners, a 40px round avatar, the display name in semibold with a blue verified badge, a gray @handle, the post text with @mentions and links in blue, an optional 16:9 image with 12px corners, and the date plus reply, repost, and like counts in a footer row. Pass the post data as props instead of loading the platform’s embed script, link the card to the original post, and lift it 2px with a soft shadow on hover, without the lift under prefers-reduced-motion.
Paste into Layerwise or any AI coding tool.
What is Tweet card?
A tweet card recreates a post from a social network as an ordinary card on your page: a round avatar, the display name with a verified mark, the @handle, the post text with links and mentions highlighted, an optional image, the time, and counts for replies, reposts, and likes. Landing pages line several up in a grid or a marquee as social proof.
There are two ways to build one. The official embed loads the platform’s script, which swaps a placeholder for an <iframe> after the page loads. It stays in sync with the real post, but it adds a third-party script, shifts the layout when it pops in, and ignores your fonts and dark mode. A static card renders the post’s data yourself, at build time or from your own API, so it loads instantly, matches your design, and works without JavaScript.
With static cards, keep the content honest: only show posts that exist, link each card to the original, and refresh the counts now and then or leave them out. Keep the post text as real text so it can be read and searched, give the avatar alt text, and reserve the image’s space with a fixed aspect ratio so nothing jumps while it loads.
Often confused with
- Card
- A card is any container for related content. A tweet card is a specific card that reproduces a post from a social network.
Related terms
All termsCard
A bordered, rounded container that groups one item’s image, title, details, and actions so it can sit in a list or grid with others.
Avatar stack
A row of overlapping profile pictures that shows who is on a project or in a document, with a +3 counter for everyone who doesn’t fit.
Marquee
A strip of logos or text that scrolls sideways in an endless loop, often used for "trusted by" rows and announcements.
Masonry layout
A layout of columns where items of different heights stack tightly with no row lines, like stones in a wall or a Pinterest board.
Build it with Layerwise
Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.