shadcn.io is not affiliated with official shadcn/ui
Social Posts with Profile Cards Testimonials Block for React
Customer posts about a component kit in a two-column feed, each in a cell with its own lines; hover or focus an @handle for a profile card with a bio, a follower count and a working Follow button, with a link-preview row under every post.
Installation
Overview
Social proof you can poke at. A compact header introduces four post cells in two columns. Each cell draws its own lines, which overshoot the corners a little with a + mark at the start, and holds the author's initials avatar, name, handle, how long ago they posted, the post, and a link-preview row for the article they shared. Hover a handle, or tab to it, and a profile card opens with the person's bio, their follower count and a Follow button. Follow works: the button fills in and the follower count goes up by one, and the same button sits in the post's header for people who do not use hover. Nothing is saved or sent. On a phone the first two posts show, with an "All 4 posts" button for the rest. It's built from Hover Card, Avatar, Item, Button and Guides, with CSS only and your theme's tokens. There is no primary button here, since nothing on the block is the one next step. For community and developer-tool pages, where who said it matters as much as what they said.
FAQ
How do I change the posts and profiles?
Edit POSTS at the top of the file: each has the post text, the author's name, handle, initials, bio and followers, a relative time, and the link preview's linkTitle and linkIcon. The preview's domain is DOMAIN. Follower counts are formatted by one Intl.NumberFormat fixed to US English, so the server and the browser agree.
How are the cells drawn?
Each post is a li with its own Guides (extend="sm" marks="start"), and the grid keeps gap-8 between cells so neighbouring lines never touch. The grid is inset from the page rails so the overshoot stays inside them.
How does the profile card open?
It opens when the pointer rests on a handle and when the handle takes keyboard focus, and it closes when you move away, blur or press Escape. The handle is a real link, so a tap on a phone follows it instead of opening a card. Because a card can only be reached by pointing or focusing, the post header also has its own Follow button: it is the way to follow with a keyboard or a touch screen.
Does Follow do anything?
It keeps state in the component: the button shows a tick and reads as pressed, and the follower count in the card goes up by one. A polite status line says "Following Ayesha Rahman." or "Unfollowed Ayesha Rahman." Nothing is saved and it resets when the page reloads. To make it real, call your API from follow.
What do screen readers hear?
Each post is a figure with the author, handle and age as its caption and the post as a blockquote. The Follow button is named "Follow" followed by the person's name and reports whether it is pressed. The link preview is one link whose name is its title and domain. The avatars and icons are hidden. The "All 4 posts" button reports aria-expanded.
How do I point the link previews at real pages?
Replace the # in each preview link with the page's address and set linkTitle and DOMAIN to match. The row is a plain link, so the whole row is clickable and it is announced like any other link. Use the page's own title, so what a visitor reads is what they get.
Related
- Pro
Social Post Style Testimonials
Chats and postsSix customer testimonials styled as social posts in cells with overshooting lines: initials avatar, verified tick, handle and age, the post and compact reply, share and like counts, with a Shine Button in the header.
- Pro
Reaction Pills Testimonials
Chats and postsA launch-week chat in a split: the headline and a Shine Button in a rail, and four messages ruled apart by hairlines, each with celebrate, love and ship-it reaction pills that really toggle and count.
- Pro
Bubble Chat Testimonials
Chats and postsA reverse split on drafting lines: a group chat of five dispatchers in a hairline frame, alternating message bubbles with a name, role and relative time above each, beside a header and one Shine Button.
- Pro
Notification Centre Testimonials
Chats and postsA reverse split: a notification window in a hairline frame where customer praise arrives as unread rows, with a new-count badge, rows that mark themselves read and a Mark all as read button, beside a header with a Shine Button.
- Pro
Centered CTA with Avatar Social Proof
Social proofA centred statement for a community, closed by a band of six members on shared hairlines: each cell a link that opens a hover card with the member's role, status and join date, under one Shine Button.
- Pro
Conversation Thread Testimonials
Chats and postsAn email-style thread for a tracing tool that turns a sceptic into an advocate, in a framed window beside a hairline divider: a subject line, earlier messages folded behind a disclosure row, the two latest open, and a Shine Button.