Skip to content

Tweet

Free

Shows a post the way it looks on X, as a feed row, an embed card, a post page, or a quote. Like, repost, and bookmark work, with no iframe.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 10, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Map your data to a TweetPost once. Then put only the parts that you want in the post, in your order.

launch-post.tsx

Tweet

<article>
PropTypeDefaultDescription
postRequired—The post: author, text, counts, media, poll, card, quote, and note (#/lib/tweet-model).
variant"detail""embed""quote""timeline"—timeline (default): a feed row. embed: a card for another site. detail: the post page. quote: the card inside another post.
likedboolean—
defaultLikedboolean—Default: post.viewerLiked. The same for repost and bookmark.
onLikedChange—
repostedboolean—
defaultRepostedboolean—
onRepostedChange—
bookmarkedboolean—
defaultBookmarkedboolean—
onBookmarkedChange—
readOnlyboolean—Shows the counts with no toggles: no hover, no pointer, no press.
localestring—The BCP 47 locale of counts and times. Default: the DisplayLocaleProvider, else "en-US".
nownumber—A fixed now (epoch ms) for stories and tests. With it, the time text never updates.
labels—
childrenReactNode—The parts. With none, the post renders the default parts of its variant.
...props<article> attributes—Every other attribute goes to the <article>, with a ref.

TweetSocialLine

<div>
PropTypeDefaultDescription
kind"pin""repost""repost"repost (default): "Ana reposted". pin: "Pinned".
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetAside

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetThreadLine

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetAvatar

<div>
PropTypeDefaultDescription
classNamestring—
insetboolean—
rounded"default""full"—
size"default""lg""sm""xl""xs"—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetBody

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetHeader

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetNames

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetAuthor

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

TweetHandle

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

TweetTime

<time>
PropTypeDefaultDescription
...props<time> attributes—Every other attribute goes to the <time>, with a ref.

TweetBrand

<div>
PropTypeDefaultDescription
variant"color""mono"—color draws the logo in its own colors; mono draws it in the text color when it has mono data.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetMenu

<button>
PropTypeDefaultDescription
classNamestring—
busyboolean—The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading.
spinnerPlacement"center""start"—center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label.
glass"clear""dark""light"—
rounded"default""full"—
size"default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs"—
variant"dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary"—
childrenRequiredReactNode—The MenuItems of the menu. The other props and the ref go to the trigger button.
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

TweetReplyingTo

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetText

<div>
PropTypeDefaultDescription
limitnumber—Fold a longer text at this many characters with Show more. Default: 280 in a feed, none on a post page or in an embed (they show the whole text, as x.com does).
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetEdited

<p>
PropTypeDefaultDescription
...props<p> attributes—Every other attribute goes to the <p>, with a ref.

TweetMedia

<div>
PropTypeDefaultDescription
onOpen—A press on a photo or a video (open a Lightbox or play). With none, the media is not a button.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetPoll

<div>
PropTypeDefaultDescription
valuenumber | null—The viewer's vote (a choice index). With one, the poll shows the results.
defaultValuenumber | null—
onValueChange—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetCard

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetQuote

<article>
PropTypeDefaultDescription
classNamestring—
...props<article> attributes—Every other attribute goes to the <article>, with a ref.

TweetNote

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetDate

<p>
PropTypeDefaultDescription
...props<p> attributes—Every other attribute goes to the <p>, with a ref.

TweetActions

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetReply

<button>
PropTypeDefaultDescription
classNamestring—
busyboolean—The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading.
spinnerPlacement"center""start"—center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label.
glass"clear""dark""light"—
rounded"default""full"—
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

TweetRepost

<button>
PropTypeDefaultDescription
classNamestring—
rounded"default""full"—
From Base UIToggleBase UI docs
disabledbooleanfalseWhether the component should ignore user interaction.
valuestring—A unique string that identifies the toggle when used inside a toggle group.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

TweetLike

<button>
PropTypeDefaultDescription
classNamestring—
rounded"default""full"—
From Base UIToggleBase UI docs
disabledbooleanfalseWhether the component should ignore user interaction.
valuestring—A unique string that identifies the toggle when used inside a toggle group.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

TweetViews

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

TweetBookmark

<button>
PropTypeDefaultDescription
classNamestring—
rounded"default""full"—
From Base UIToggleBase UI docs
disabledbooleanfalseWhether the component should ignore user interaction.
valuestring—A unique string that identifies the toggle when used inside a toggle group.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

TweetShare

<button>
PropTypeDefaultDescription
classNamestring—
busyboolean—The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading.
spinnerPlacement"center""start"—center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label.
glass"clear""dark""light"—
rounded"default""full"—
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

TweetCopyLink

<button>
PropTypeDefaultDescription
From Base UIButtonBase UI docs
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

TweetReadReplies

<div>
PropTypeDefaultDescription
externalboolean—Opens the link in a new tab (target="_blank", rel="noopener noreferrer") and adds the arrow icon. A target or rel prop wins.
tone"destructive""info""neutral"—
underline"always""dotted""grow""hover""none"—
variant"default""inherit""muted"—
From Base UIUseRenderBase UI docs
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetUnavailable

<div>
PropTypeDefaultDescription
labels—
learnMoreHrefstring"https://help.x.com/rules-and-policies/notices-on-x"The Learn more address. Default: X's help page on unavailable posts.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TweetSkeleton

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use variant="embed" for a post on another site, and timeline for a feed.
  • Map your own data to TweetPost once, in your adapter.
TabMoves through the links and the actions of the post.
EnterOpens a link, or turns like, repost, or bookmark on or off.
SpaceTurns like, repost, or bookmark on or off.

Each post is an article named "Post by" and the author name.

Like, repost, and bookmark are toggle buttons with aria-pressed; their names hold the count ("2,412 likes. Like").

Show more, Show, and a poll choice keep the focus in the post when they go away.

A quote card has one link, its time; the link covers the card, and the other links stay above it.

The counts that roll are hidden from screen readers: the button names hold them.

Like
panel · the heart pops when it turns on
Counts
panel · a count rolls to its new value
Poll
reveal · the result bars grow from the start edge after a vote
Hover
hover · the circle behind an action icon tints in the action color
Press
press · the action icon shrinks a little while pressed
  1. AddedTweet, with Anchor, Avatar, Button, Image, Menu, Rolling Number, Skeleton, Toggle.
Open the release