Timelines
Guides contents
Customize an embedded timeline with data-* attributes added to a fallback anchor element or passed to a JavaScript factory function in an options object.
Parameters
| Option | Values | Default | Notes |
|---|---|---|---|
| show-replies | true | false | Show Tweets in response to another Tweet or account |
| chrome | noheader, nofooter, noborders, transparent, noscrollbar | Undefined | Toggle the display of design elements in the widget. This parameter is a space-separated list of values |
| theme | dark | light | Display light text on a dark background |
| width | Positive integer | auto, derived from container size | Set the maximum width of the embedded Tweet |
| height | Positive integer | 600 | Set a fixed height of the embedded widget |
| tweet-limit | Range: 1-20 | Undefined | Render a timeline statically, displaying only n number of Tweets. The height parameter has no effect when a Tweet limit is set |
| link-color | Hexadecimal color | #2b7bb9 | Adjust the color of links, including hashtags and @mentions, inside each Tweet |
| border-color | Hexadecimal color | Varies by theme | Adjust the color of borders inside the widget |
| aria-polite | polite, assertive, rude | polite | Apply the specified aria-polite behavior to the rendered timeline. New Tweets may be added to the top of a timeline, affecting screen readers |
| dnt | true, false | false | When set to true, the timeline and its embedded page on your site are not used for purposes that include personalized suggestions and personalized ads |
HTML example
Tweets by @TwitterDev
Our data science team is sharing their techniques for better understanding the people Tweeting about a topic.
— Twitter Dev (@TwitterDev) March 6, 2018
In this latest post, @jrmontag takes us through the analysis of those Tweeting about the 2017 Cannes film festival. Take a look! 👀 https://t.co/T6ljBOPmiu
<a class="twitter-timeline"
href="https://twitter.com/TwitterDev"
data-height="400"
data-chrome="nofooter"
data-link-color="#820bbb"
data-border-color="#a80000">
Tweets by @TwitterDev
</a>
JavaScript factory example
twttr.widgets.createTimeline(
{
sourceType: "profile",
screenName: "twitterdev"
},
document.getElementById("container"),
{
height: 400,
chrome: "nofooter",
linkColor: "#820bbb",
borderColor: "#a80000"
}
);