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>| Prop | Type | Default | Description |
|---|---|---|---|
| post | — | 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. |
| liked | boolean | — | |
| default | boolean | — | Default: post.viewerLiked. The same for repost and bookmark. |
| on | — | ||
| reposted | boolean | — | |
| default | boolean | — | |
| on | — | ||
| bookmarked | boolean | — | |
| default | boolean | — | |
| on | — | ||
| read | boolean | — | Shows the counts with no toggles: no hover, no pointer, no press. |
| locale | string | — | The BCP 47 locale of counts and times. Default: the DisplayLocaleProvider, else "en-US". |
| now | number | — | A fixed now (epoch ms) for stories and tests. With it, the time text never updates. |
| labels | — | ||
| children | ReactNode | — | 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>| Prop | Type | Default | Description |
|---|---|---|---|
| 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>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
TweetThreadLine
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
TweetAvatar
<div>TweetBody
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
TweetHeader
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
TweetNames
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
TweetAuthor
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
TweetHandle
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
TweetTime
<time>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <time> attributes | — | Every other attribute goes to the <time>, with a ref. |
TweetBrand
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| 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>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| class | string | — | |||||
| busy | boolean | — | 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. | ||||
| spinner | "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" | — | |||||
| children | ReactNode | — | The MenuItems of the menu. The other props and the ref go to the trigger button. | ||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether 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>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
TweetText
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| limit | number | — | 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>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <p> attributes | — | Every other attribute goes to the <p>, with a ref. |
TweetMedia
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| on | — | 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>| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | null | — | The viewer's vote (a choice index). With one, the poll shows the results. |
| default | number | null | — | |
| on | — | ||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
TweetCard
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
TweetQuote
<article>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| ...props | <article> attributes | — | Every other attribute goes to the <article>, with a ref. |
TweetNote
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
TweetDate
<p>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <p> attributes | — | Every other attribute goes to the <p>, with a ref. |
TweetActions
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
TweetReply
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| class | string | — | |||||
| busy | boolean | — | 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. | ||||
| spinner | "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 | |||||||
| focusable | boolean | false | Whether 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>| Prop | Type | Default | Description | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||||||
| rounded | "default""full" | — | ||||||||||||
From Base UIToggleBase UI docs | ||||||||||||||
| disabled | boolean | false | Whether the component should ignore user interaction. | |||||||||||
| value | string | — | 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>| Prop | Type | Default | Description | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||||||
| rounded | "default""full" | — | ||||||||||||
From Base UIToggleBase UI docs | ||||||||||||||
| disabled | boolean | false | Whether the component should ignore user interaction. | |||||||||||
| value | string | — | 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>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
TweetBookmark
<button>| Prop | Type | Default | Description | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||||||
| rounded | "default""full" | — | ||||||||||||
From Base UIToggleBase UI docs | ||||||||||||||
| disabled | boolean | false | Whether the component should ignore user interaction. | |||||||||||
| value | string | — | 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>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| class | string | — | |||||
| busy | boolean | — | 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. | ||||
| spinner | "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 | |||||||
| focusable | boolean | false | Whether 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>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| class | string | — | |||||
| busy | boolean | — | 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. | ||||
| spinner | "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 | |||||||
| focusable | boolean | false | Whether 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. | ||||
TweetReadReplies
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| external | boolean | — | 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>| Prop | Type | Default | Description |
|---|---|---|---|
| labels | — | ||
| learn | string | "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>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
| Tab | Moves through the links and the actions of the post. |
|---|---|
| Enter | Opens a link, or turns like, repost, or bookmark on or off. |
| Space | Turns like, repost, or bookmark on or off. |
Built with
Installs with Tweet





