Skip to content
Knowns UI
Get ProSign in

Social Post

One post or reply from X, Threads or another network, kept word for word: who wrote it, what they wrote, when and where. The whole card opens the original in a new tab, long text folds behind Show more, and a compact size fits walls and narrow columns.

On this page
Used for
  • A wall of replies on a landing page
  • A post quoted in a blog article
  • Launch day reactions
  • Mentions in a changelog
  • A press or social proof strip

Examples

Size
Source

Long text

Compact, with initials and with media

Accessibility

  • The card is an article named by the author. Its link comes first in the tab order and is named for what it opens: "Open Maya Okafor's post on X". Change the word with noun ("reply").
  • Links in the text are separate links after it, so a keyboard reaches each one; the card link covers the rest of the card for the pointer.
  • Show more is a button with aria-expanded and aria-controls pointing at the text.
  • The verified check is an image named "Verified". The source mark and the avatar are decoration, because the name and the link already say who and where.
  • Give each picture an alt text; an empty alt marks it as decoration.

Installation

npx knowns-ui@latest add social-post
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

name
string
Display name. Names the card for a screen reader.
handle
string
Shown as @handle. "maya" and "@maya" both work.
avatar
string
Photo URL. Without it, or when it fails, initials show.
verified
boolean
Defaultfalse
A check after the name, announced as Verified.
text
string
The post, word for word. Line breaks are kept.
media
{ src, alt, width?, height? }[]
Up to four pictures under the text.
date
string | number | Date
When it was posted, printed as "Nov 24, 2026" in UTC.
href
string
The original. The whole card links there in a new tab.
source
SocialKind
Defaultfrom href
The network: sets the source mark and where @mentions and #tags point.
size
"default" | "compact"
Default"default"
Compact for walls and narrow columns.
clamp
number
Default0
Cut the text after this many lines and show Show more. 0 shows it all.
expanded
boolean
Whether clamped text is open (controlled).
defaultExpanded
boolean
Defaultfalse
The first state when expanded is not set.
onExpandedChange
(open: boolean) => void
Called by Show more and Show less.
linkify
boolean
Defaulttrue
Turn links, @mentions and #tags in the text into links.
noun
string
Default"post"
The word in the card link's name.
hideSource
boolean
Defaultfalse
Hide the network mark in the corner.
footer
ReactNode
Anything after the date, such as a count you keep.
VerifiedMark
{ className? }
The check on its own, exported for a name line elsewhere.
postSegments
(text, source?, links?) => PostSegment[]
The text split into plain runs, links, mentions and tags; joins back to the exact text.

What it handles

  1. 01Keeps the text word for word: line breaks stay, links, @mentions and #tags become links, and nothing is rewritten or translated.
  2. 02Makes the whole card one link to the original in a new tab, while the links inside the text and the Show more button stay their own targets.
  3. 03Reads the network from the link (x.com is X, threads.com is Threads) for the source mark and for where mentions and tags point.
  4. 04Cuts long text after the lines you choose and shows Show more only when the text really is longer.
  5. 05Falls back to initials when there is no photo or it fails to load.
  6. 06Prints the date the same way on the server and in the browser (UTC), so nothing changes when the page hydrates.

States

Default
Avatar, name, verified mark, handle, source mark, the text, the date
none
Hover (with a link)
The card surface tints a little
colour, 120ms
Clamped
The text stops after `clamp` lines with Show more under it
none
Expanded
The full text with Show less
instant
No photo
Initials on a tint in the same circle
none
Compact
Smaller avatar, type and padding for walls and narrow columns
none

Works with

When to use

When to use

  • One post or reply from X, Threads or another network, word for word, linking to the original.
  • Cards in a wall of replies or a launch recap, with the compact size.

When not to use

  • A comment thread in your own app: use Comment.
  • A customer quote with a role and company: use Testimonials.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Social Post to my app and wire it to my own data.
  • I need one post or reply from X, Threads or another network, word for word, linking to the original. Set that up with the Knowns UI Social Post.
  • Which Social Post props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "social-post" }) and search_docs({ query: "social post" }).

Need help?

Stuck on Social Post, or found something off? We read every message.