Please note:We retired the Likes, Collections, and Moments timelines on January 13, 2023.We recommend you use the Profile and Lists timelines, which we’re updating to become faster, easier to use, and more up-to-date with X features and functionality.You can learn more about this change in our announcement.
Timeline types
Profile timeline
A profile timeline displays the latest Posts from the specified (public) X account.List timeline
A list timeline displays the latest Posts from a curated, public list of X accounts. The timeline includes a header displaying the list’s name, description, and curator. To create lists on x.com or in the X app, learn more here.How to add an embedded timeline to your website
Visit publish.x.com to generate embed codes for profiles and lists.Customization
Dimensions
An embedded timeline automatically adjusts to the width of its parent element with a minimum width of 180 pixels and a maximum width of 520 pixels. The grid display has a minimum width of 220 pixels. Set the maximum width or the maximum height of an embedded timeline by adding a data-width or data-height attribute to the embed code anchor element.Custom chrome
Control the frame around the linear timeline by setting adata-chrome attribute with space-separated tokens for each chrome component.
| Token | Description |
|---|---|
noheader | Hides the timeline header. Implementing sites must add their own X attribution, link to the source timeline, and comply with other X display requirements. |
nofooter | Hides the timeline footer and Post composer link, if included in the timeline widget type. |
noborders | Removes all borders within the widget including borders surrounding the widget area and separating Posts. |
noscrollbar | Crops and hides the main timeline scrollbar, if visible. Please consider that hiding standard user interface components can affect the accessibility of your website. |
transparent | Removes the widget’s background color. |
Example
Limiting the number of Posts displayed
Display a specific number of items between 1 and 20 by customizing your embed HTML. Add adata-tweet-limit attribute to the embed code to specify a number of Posts. The timeline will automatically adjust its height to display a specified number of Posts. The timeline is fixed after display; it will not poll for new Posts until the page is refreshed.
Example
Accessibility: Override ARIA live politeness
An embedded timeline describes its content for screen readers and other assistive technologies using additional markup defined in WAI-ARIA standards. A timeline widget is a live region of a page which will receive updates when new Posts become available. By default, a timeline has a politeness value ofpolite by default; set a data-aria-polite attribute value of assertive to set the embedded timeline live region politeness to assertive, for example if you’re using the embedded Timeline as a primary source of live content in your page.