Embedded Moment parameter reference

Customize an embedded Moment with data-* attributes added to a fallback anchor element or passed to a JavaScript factory function in an options object.

Parameters

Parameter Description Example
limit Display a maximum number of items between 1 and 20 inclusive. 3
width Set the maximum width of the embedded moment. Minimum: 220. 400
lang A supported Twitter language code. Loads template text components in the specified language. Note: does not affect the original text of an author. es
dnt When set to true, the Moment and its embedded page on your site are not used for purposes that include personalized suggestions and personalized ads. true

HTML example

<a class="twitter-moment"
  href="https://twitter.com/i/moments/650667182356082688"
  data-limit="3"
  data-width="400">
The Obamas' wedding anniversary
</a>

JavaScript factory example

twttr.widgets.createMoment(
  "650667182356082688",
  document.getElementById("container"),
  {
    width: 400,
    limit: 3
  }
);